pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.108 2000/02/06 19:15:50 mast Exp $"); + RCSID("$Id: threads.c,v 1.109 2000/02/06 19:19:07 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:995:    f_allocate(1);    }   }      void f_thread_id_status(INT32 args)   {    pop_n_elems(args);    push_int(THIS_THREAD->status);   }    - void f_thread_id_id(INT32 args) - { -  pop_n_elems(args); -  push_int(THIS_THREAD->id); - } -  +    void f_thread_id__sprintf (INT32 args)   {    pop_n_elems (args);    push_constant_text ("Thread.Thread(");    push_int (THIS_THREAD->id);    push_constant_text (")");    f_add (3);   }      static void f_thread_id_result(INT32 args)
pike.git/src/threads.c:1245:       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("id",f_thread_id_id,tFunc(tNone,tInt),0); +     ADD_FUNCTION("_sprintf",f_thread_id__sprintf,tFunc(tNone,tStr),0);    set_gc_mark_callback(thread_was_marked);    set_gc_check_callback(thread_was_checked);    set_init_callback(init_thread_obj);    set_exit_callback(exit_thread_obj);    thread_id_prog=new_program;    add_ref(thread_id_prog);    end_class("thread_id", 0);       /* function(mixed ...:object(thread_id)) */