summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2009-07-15 01:36:04 +0000
committerroot <root>2009-07-15 01:36:04 +0000
commitb4d52ef65f575647849bdb7751a5c94aa49793fc (patch)
tree35aae1da92ed28855f360efb87dc86b61ba7869e
parentd95717aae80fb68dbe4f0f19829a95d2cdc7ecff (diff)
*** empty log message ***rel-3_3
-rw-r--r--xthread.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/xthread.h b/xthread.h
index 88881e8..d9a404e 100644
--- a/xthread.h
+++ b/xthread.h
@@ -118,8 +118,8 @@ typedef pthread_t thread_t;
# define PTHREAD_STACK_MIN 0
#endif
-#ifndef XTHREAD_STACKSIZE
-# define XTHREAD_STACKSIZE sizeof (long) * 4096
+#ifndef X_STACKSIZE
+# define X_STACKSIZE sizeof (long) * 4096
#endif
static int
@@ -131,11 +131,7 @@ thread_create (thread_t *tid, void *(*proc)(void *), void *arg)
pthread_attr_init (&attr);
pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
-
- if (XTHREAD_STACKSIZE > 0)
- pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN > (XTHREAD_STACKSIZE)
- ? PTHREAD_STACK_MIN : (XTHREAD_STACKSIZE));
-
+ pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN < X_STACKSIZE ? X_STACKSIZE : PTHREAD_STACK_MIN);
#ifdef PTHREAD_SCOPE_PROCESS
pthread_attr_setscope (&attr, PTHREAD_SCOPE_PROCESS);
#endif