pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.157 2001/05/31 22:51:53 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.158 2001/06/20 23:16:32 mast Exp $");      PMOD_EXPORT int num_threads = 1;   PMOD_EXPORT 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:1359:    *!    *! @note    *! This class is simulated when Pike is compiled without thread support,    *! so it's always available.    */      /* FIXME: Why not use an init callback()? */   void f_thread_local_create( INT32 args )   {    static INT32 thread_local_id = 0; -  ((struct thread_local *)Pike_fp->current_object->storage)->id = +  ((struct thread_local *)CURRENT_STORAGE)->id =    thread_local_id++;    pop_n_elems(args);    push_int(0);   }      PMOD_EXPORT void f_thread_local(INT32 args)   {    struct object *loc = clone_object(thread_local_prog,0);    pop_n_elems(args);    push_object(loc);