diff options
-rw-r--r-- | thrpool.c | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -12,24 +12,6 @@ struct mog_thr_start_arg { unsigned *do_quit; }; -/* - * we can lower this if we can test with lower values, NPTL minimum is 16K. - * We also use syslog() and *printf() functions which take a lot of - * stack under glibc, so we'll add BUFSIZ (8192 on glibc) to that - */ -#if MOG_LIBKQUEUE /* libkqueue uses quite a bit of stack */ -# define MOG_THR_STACK_SIZE (0) -#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; - static sigset_t quitset; __attribute__((constructor)) static void thrpool_init(void) @@ -141,9 +123,6 @@ thrpool_add(struct mog_thrpool *tp, unsigned size, unsigned long *nr_eagain) CHECK(int, 0, pthread_attr_init(&attr)); - if (stacksize > 0) - CHECK(int, 0, pthread_attr_setstacksize(&attr, stacksize)); - thr = &tp->threads[tp->n_threads].thr; CHECK(int, 0, pthread_mutex_lock(&arg.mtx)); |