pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.43 1997/09/23 15:17:18 grubba Exp $"); + RCSID("$Id: threads.c,v 1.44 1997/10/05 03:40:34 grubba Exp $");      int num_threads = 1;   int threads_disabled = 0;      #ifdef _REENTRANT   #include "threads.h"   #include "array.h"   #include "object.h"   #include "pike_macros.h"   #include "callback.h"
pike.git/src/threads.c:403:   {    struct program *tmp;    INT32 mutex_key_offset;      #ifdef SGI_SPROC_THREADS   #error /* Need to specify a filename */    us_cookie = usinit("");   #endif /* SGI_SPROC_THREADS */       THREADS_FPRINTF((stderr, "THREADS_DISALLOW() Initializing threads.\n")); +  + #ifdef POSIX_THREADS + #ifdef HAVE_PTHREAD_INIT +  pthread_init(); + #endif /* HAVE_PTHREAD_INIT */ + #endif /* POSIX_THREADS */ +     mt_init( & interpreter_lock);    mt_lock( & interpreter_lock);   #ifdef POSIX_THREADS    pthread_attr_init(&pattr);   #ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE    pthread_attr_setstacksize(&pattr, 2 * 1024 * 1204);   #endif    pthread_attr_setdetachstate(&pattr, PTHREAD_CREATE_DETACHED);   #endif