diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2011-12-09 10:23:00 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2011-12-09 10:23:00 +0400 |
commit | c8bc8763ea6980ef3e3fa7e3dbe2a598a1169de5 (patch) | |
tree | 3b070b9969cc474199f27bad31f92903c3a99c06 /accel-pppd/triton/triton.c | |
parent | 0f5d35a093831b1a54b670fa8d3511103a15004e (diff) | |
download | accel-ppp-c8bc8763ea6980ef3e3fa7e3dbe2a598a1169de5.tar.gz accel-ppp-c8bc8763ea6980ef3e3fa7e3dbe2a598a1169de5.zip |
core: increase worker thread stack size
Diffstat (limited to 'accel-pppd/triton/triton.c')
-rw-r--r-- | accel-pppd/triton/triton.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/accel-pppd/triton/triton.c b/accel-pppd/triton/triton.c index aa2183e6..97c277a5 100644 --- a/accel-pppd/triton/triton.c +++ b/accel-pppd/triton/triton.c @@ -10,6 +10,12 @@ #include "triton_p.h" #include "memdebug.h" +#if __WORDSIZE == 32 +#define WORKER_STACK_SIZE 64*1024 +#else +#define WORKER_STACK_SIZE 128*1024 +#endif + int thread_count = 2; int max_events = 64; @@ -242,7 +248,7 @@ struct _triton_thread_t *create_thread() } pthread_attr_init(&attr); - pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN); + pthread_attr_setstacksize(&attr, WORKER_STACK_SIZE); memset(thread, 0, sizeof(*thread)); pthread_mutex_init(&thread->sleep_lock, NULL); |