pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.147 2000/12/01 08:09:55 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.148 2000/12/01 12:39:46 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:1154:   void f_thread_local_set(INT32 args)   {    struct svalue key;    struct mapping *m;    key.u.integer = ((struct thread_local *)CURRENT_STORAGE)->id;    key.type = T_INT;    key.subtype = NUMBER_NUMBER;    if(args>1)    pop_n_elems(args-1);    else if(args<1) -  Pike_error("Too few arguments to thread_local->set()\n"); +  Pike_error("Too few arguments to Thread.Local.set()\n");       if(Pike_interpreter.thread_id == NULL) -  Pike_error("Trying to set thread_local without thread!\n"); +  Pike_error("Trying to set Thread.Local without thread!\n");       if((m = OBJ2THREAD(Pike_interpreter.thread_id)->thread_local) == NULL)    m = OBJ2THREAD(Pike_interpreter.thread_id)->thread_local =    allocate_mapping(4);       mapping_insert(m, &key, &Pike_sp[-1]);   }      /* Thread farm code by Per    *