pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.16 1997/02/07 01:37:49 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.17 1997/02/11 13:27:11 grubba Exp $");      int num_threads = 1;   int threads_disabled = 0;      #ifdef _REENTRANT   #include "threads.h"   #include "array.h"   #include "object.h"   #include "macros.h"   #include "callback.h"
pike.git/src/threads.c:334:   #endif    add_efun("this_thread",f_this_thread,"function(:object)",    OPT_EXTERNAL_DEPEND);       start_new_program();    add_storage(sizeof(struct mutex_storage));    add_function("lock",f_mutex_lock,"function(:object)",0);    add_function("trylock",f_mutex_trylock,"function(:object)",0);    set_init_callback(init_mutex_obj);    set_exit_callback(exit_mutex_obj); -  end_class("mutex"); +  end_class("mutex", 0);       start_new_program();    add_storage(sizeof(struct key_storage));    set_init_callback(init_mutex_key_obj);    set_exit_callback(exit_mutex_key_obj);    mutex_key=end_program();       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"); +  end_class("condition", 0);       start_new_program();    thread_id_prog=end_program();       thread_id=clone(thread_id_prog,0);   }      void th_cleanup()   {    if(mutex_key)