pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.60 1998/03/18 20:22:32 per Exp $"); + RCSID("$Id: threads.c,v 1.61 1998/03/20 22:53:31 hubbe 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:768:    mutex_key_offset = add_storage(sizeof(struct key_storage));    /* This is needed to allow the gc to find the possible circular reference.    * It also allows a process to take over ownership of a key.    */    map_variable("_owner", "object", 0,    mutex_key_offset + OFFSETOF(key_storage, owner), T_OBJECT);    set_init_callback(init_mutex_key_obj);    set_exit_callback(exit_mutex_key_obj);    mutex_key=end_program();    mutex_key->flags|=PROGRAM_DESTRUCT_IMMEDIATE; + #ifdef DEBUG    if(!mutex_key)    fatal("Failed to initialize mutex_key program!\n"); -  + #endif       start_new_program();    add_storage(sizeof(COND_T));    add_function("wait",f_cond_wait,"function(void|object:void)",0);    add_function("signal",f_cond_signal,"function(:void)",0);    add_function("broadcast",f_cond_broadcast,"function(:void)",0);    set_init_callback(init_cond_obj);    set_exit_callback(exit_cond_obj);    end_class("condition", 0);