diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-04-20 03:34:04 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-04-20 03:34:04 +0000 |
commit | cd49627f2827ef6a6d58adc26069d3a8bc5beca5 (patch) | |
tree | 3195f4f16647b99f3d3b734057f533ca960d3593 /thrpool.c | |
parent | 4a456625b4b68cbee9b4c7009b27ce82f7bf842a (diff) | |
download | cmogstored-cd49627f2827ef6a6d58adc26069d3a8bc5beca5.tar.gz |
We don't know enough about the libc other platforms to make an intelligent choice about stack size, so just use the default to avoid potential problems.
Diffstat (limited to 'thrpool.c')
-rw-r--r-- | thrpool.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -11,12 +11,14 @@ */ #if defined(LIBKQUEUE) && (LIBKQUEUE == 1) # define MOG_THR_STACK_SIZE (0) -#else +#elif defined(__GLIBC__) || defined(__FreeBSD__) # define MOG_THR_STACK_SIZE ((16 * 1024) + MAX(8192,BUFSIZ)) # if defined(PTHREAD_STACK_MIN) && (PTHREAD_STACK_MIN > MOG_THR_STACK_SIZE) # undef MOG_THR_STACK_SIZE # define MOG_THR_STACK_SIZE PTHREAD_STACK_MIN # endif +#else +# define MOG_THR_STACK_SIZE (0) #endif static const size_t stacksize = (size_t)MOG_THR_STACK_SIZE; |