pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.128 2000/06/09 22:48:31 mast Exp $"); + RCSID("$Id: threads.c,v 1.129 2000/06/10 11:52:44 mast Exp $");      int num_threads = 1;   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:1084:   void exit_thread_obj(struct object *o)   {    if(THIS_THREAD->thread_local != NULL) {    free_mapping(THIS_THREAD->thread_local);    THIS_THREAD->thread_local = NULL;    }    co_destroy(& THIS_THREAD->status_change);    th_destroy(& THIS_THREAD->id);   }    - static void thread_was_marked(struct object *o) + static void thread_was_recursed(struct object *o)   {    struct thread_state *tmp=THIS_THREAD;    if(tmp->thread_local != NULL)    gc_recurse_mapping(tmp->thread_local);   }      static void thread_was_checked(struct object *o)   {    struct thread_state *tmp=THIS_THREAD;    if(tmp->thread_local != NULL)
pike.git/src/threads.c:1297:    START_NEW_PROGRAM_ID(THREAD_ID);    thread_storage_offset=ADD_STORAGE(struct thread_state);    thread_id_result_variable=simple_add_variable("result","mixed",0);    /* function(:array) */    ADD_FUNCTION("backtrace",f_thread_backtrace,tFunc(tNone,tArray),0);    /* function(:mixed) */    ADD_FUNCTION("wait",f_thread_id_result,tFunc(tNone,tMix),0);    /* function(:int) */    ADD_FUNCTION("status",f_thread_id_status,tFunc(tNone,tInt),0);    ADD_FUNCTION("_sprintf",f_thread_id__sprintf,tFunc(tNone,tStr),0); -  set_gc_mark_callback(thread_was_marked); +  set_gc_recurse_callback(thread_was_recursed);    set_gc_check_callback(thread_was_checked);    set_init_callback(init_thread_obj);    set_exit_callback(exit_thread_obj);    thread_id_prog=new_program;    thread_id_prog->flags |= PROGRAM_NO_EXPLICIT_DESTRUCT;    add_ref(thread_id_prog);    end_class("thread_id", 0);       /* function(mixed ...:object(thread_id)) */    ADD_EFUN("thread_create",f_thread_create,