1998-08-10
1998-08-10 23:33:31 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
-
490887591e611930069d8ed24942b0c1f92038b7
(7 lines)
(+5/-2)
[
Show
| Annotate
]
Branch: 7.9
stack checks and -ss<thread stack size> implemented
Rev: src/configure.in:1.230
Rev: src/interpret.c:1.94
Rev: src/interpret.h:1.22
Rev: src/main.c:1.57
Rev: src/testsuite.in:1.120
Rev: src/threads.c:1.80
Rev: src/threads.h:1.48
1:
#include "global.h"
- RCSID("$Id: threads.c,v 1.79 1998/07/17 22:37:11 hubbe Exp $");
+ RCSID("$Id: threads.c,v 1.80 1998/08/10 23:33:31 hubbe Exp $");
int num_threads = 1;
int threads_disabled = 0;
19:
int live_threads = 0;
COND_T live_threads_change;
COND_T threads_disabled_change;
+ size_t thread_stack_size=1024 * 1204;
#ifdef __NT__
450:
thread_id=arg.id;
SWAP_OUT_THREAD((struct thread_state *)thread_id->storage); /* Init struct */
((struct thread_state *)thread_id->storage)->swapped=0;
+ stack_top=((char *)&data)+ (thread_stack_size-16384) * STACK_DIRECTION
#ifdef THREAD_TRACE
{
t_flag = default_t_flag;
881: Inside #if defined(POSIX_THREADS)
#ifdef POSIX_THREADS
pthread_attr_init(&pattr);
#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE
- pthread_attr_setstacksize(&pattr, 1024 * 1204);
+ pthread_attr_setstacksize(&pattr, thread_stack_size);
#endif
pthread_attr_setdetachstate(&pattr, PTHREAD_CREATE_DETACHED);