pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.174 2001/11/09 02:09:14 nilsson Exp $"); + RCSID("$Id: threads.c,v 1.175 2001/11/12 15:59:11 mast 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:27:   PMOD_EXPORT int live_threads = 0, disallow_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" + #define PIKE_USE_OWN_ATFORK         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))   {    if(prepare)    add_to_callback(&atfork_prepare_callback, (callback_func) prepare, 0, 0);
pike.git/src/threads.c:1921:    {    free_program(thread_local_prog);    thread_local_prog=0;    }       if(thread_id_prog)    {    free_program(thread_id_prog);    thread_id_prog=0;    } +  + #ifdef PIKE_USE_OWN_ATFORK +  free_callback_list(&atfork_prepare_callback); +  free_callback_list(&atfork_parent_callback); +  free_callback_list(&atfork_child_callback); + #endif   }      #endif