pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.165 2001/09/20 19:36:43 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.166 2001/09/24 16:45:39 grubba Exp $");      PMOD_EXPORT int num_threads = 1;   PMOD_EXPORT int threads_disabled = 0;      #ifdef _REENTRANT   #include "threads.h"   #include "array.h"   #include "mapping.h"   #include "object.h"   #include "pike_macros.h"
pike.git/src/threads.c:22:   #include "operators.h"   #include "bignum.h"      #include <errno.h>      PMOD_EXPORT int live_threads = 0;   PMOD_EXPORT COND_T live_threads_change;   PMOD_EXPORT COND_T threads_disabled_change;   PMOD_EXPORT size_t thread_stack_size=256 * 1204;    + /* SCO magic... */ + int __thread_sys_behavior = 1; +    #if !defined(HAVE_PTHREAD_ATFORK) && !defined(th_atfork)   #include "callback.h"         static struct callback_list atfork_prepare_callback;   static struct callback_list atfork_parent_callback;   static struct callback_list atfork_child_callback;      int th_atfork(void (*prepare)(void),void (*parent)(void),void (*child)(void))   {
pike.git/src/threads.c:731:    *!    *! @note    *! This function is only available on systems with POSIX or UNIX or WIN32    *! threads support.    *!    *! @seealso    *! @[Mutex], @[Condition], @[this_thread()]    */   void f_thread_create(INT32 args)   { -  THREAD_T dummy; +     struct thread_starter *arg;    int tmp;    arg = ALLOC_STRUCT(thread_starter);    arg->args=aggregate_array(args);    arg->id=clone_object(thread_id_prog,0);    OBJ2THREAD(arg->id)->status=THREAD_RUNNING;      #ifdef HAVE_BROKEN_LINUX_THREAD_EUID    arg->euid = geteuid();    arg->egid = getegid();
pike.git/src/threads.c:1661: Inside #if defined(POSIX_THREADS)
   pthread_attr_setstacksize(&small_pattr, 4096*sizeof(char *));   #endif    pthread_attr_setdetachstate(&small_pattr, PTHREAD_CREATE_DETACHED);       th_running = 1;   #endif   }      void th_init(void)   { -  struct program *tmp; +     ptrdiff_t mutex_key_offset;      #ifdef UNIX_THREADS      /* function(int:void) */    ADD_EFUN("thread_set_concurrency",f_thread_set_concurrency,tFunc(tInt,tVoid), OPT_SIDE_EFFECT);   #endif       START_NEW_PROGRAM_ID(THREAD_MUTEX_KEY);    mutex_key_offset = ADD_STORAGE(struct key_storage);