about summary refs log tree commit homepage
path: root/thrpool.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-04-20 03:34:04 +0000
committerEric Wong <normalperson@yhbt.net>2012-04-20 03:34:04 +0000
commitcd49627f2827ef6a6d58adc26069d3a8bc5beca5 (patch)
tree3195f4f16647b99f3d3b734057f533ca960d3593 /thrpool.c
parent4a456625b4b68cbee9b4c7009b27ce82f7bf842a (diff)
downloadcmogstored-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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/thrpool.c b/thrpool.c
index ae90e64..3d05e9f 100644
--- a/thrpool.c
+++ b/thrpool.c
@@ -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;