lkml.org 
[lkml]   [2008]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: Improve hackbench
From
Date
On Fri, 2008-01-04 at 07:44 -0500, Lee Revell wrote:
> On Jan 4, 2008 3:10 AM, Ingo Molnar <mingo@elte.hu> wrote:
> > http://redhat.com/~mingo/cfs-scheduler/tools/hackbench.c
> >
>
> Why not lose the #ifdef and just use PTHREAD_STACK_MIN?
That's a good idea.

Thanks,
-yanmin

---

--- hackbench.c.orig 2008-01-10 08:24:36.000000000 +0800
+++ hackbench.c 2008-01-10 08:25:12.000000000 +0800
@@ -151,10 +151,8 @@ pthread_t create_worker(void *ctx, void
if (pthread_attr_init(&attr) != 0)
barf("pthread_attr_init:");

-#ifndef __ia64__
- if (pthread_attr_setstacksize(&attr, (size_t)(16*1024)) != 0)
+ if (pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN) != 0)
barf("pthread_attr_setstacksize");
-#endif

if ((err=pthread_create(&childid, &attr, func, ctx)) != 0) {
fprintf(stderr, "pthread_create failed: %s (%d)\n", strerror(err), err);



\
 
 \ /
  Last update: 2008-01-07 02:33    [W:0.087 / U:0.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site