pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.48 1998/01/02 01:05:54 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.49 1998/01/02 08:18:43 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:525:    start_new_program();    add_storage(sizeof(struct thread_state));    thread_id_result_variable=simple_add_variable("result","mixed",0);    add_function("backtrace",f_thread_backtrace,"function(:array)",0);    add_function("wait",f_thread_id_result,"function(:mixed)",0);    add_function("status",f_thread_id_status,"function(:int)",0);   #ifdef DEBUG    set_gc_mark_callback(thread_was_marked);   #endif    set_init_callback(init_thread_obj); -  set_init_callback(exit_thread_obj); +  set_exit_callback(exit_thread_obj);    thread_id_prog=end_program();    if(!mutex_key)    fatal("Failed to initialize thread program!\n");       thread_id=clone_object(thread_id_prog,0);    SWAP_OUT_THREAD((struct thread_state *)thread_id->storage); /* Init struct */    ((struct thread_state *)thread_id->storage)->swapped=0;   }      void th_cleanup(void)