pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.67 1998/04/09 02:48:40 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.68 1998/04/13 14:31:59 grubba 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:152:      struct thread_starter   {    struct object *id;    struct array *args;   };      void exit_threads_disable(struct object *o)   {    if(threads_disabled) threads_disabled--; +  /* fprintf(stderr, "exit_threads_disable(): threads_disabled:%d\n", threads_disabled); */    co_broadcast(&threads_disabled_change);   }      void init_threads_disable(struct object *o)   {    threads_disabled++; -  +  /* fprintf(stderr, "init_threads_disable(): threads_disabled:%d\n", threads_disabled); */    while (live_threads) {    THREADS_FPRINTF((stderr,    "_disable_threads(): Waiting for %d threads to finish\n",    live_threads));    co_wait(&live_threads_change, &interpreter_lock);    }   }      /* Thread hashtable */   
pike.git/src/threads.c:305:       THREADS_FPRINTF((stderr,"THREADS_DISALLOW() Thread %08x created...\n",    (unsigned int)arg.id));       if((tmp=mt_lock( & interpreter_lock)))    fatal("Failed to lock interpreter, errno %d\n",tmp);    init_interpreter();    thread_id=arg.id;    SWAP_OUT_THREAD((struct thread_state *)thread_id->storage); /* Init struct */    ((struct thread_state *)thread_id->storage)->swapped=0; + #ifdef THREAD_TRACE +  { +  t_flag = default_t_flag; +  } + #endif /* THREAD_TRACE */       THREADS_FPRINTF((stderr,"THREAD %08x INITED\n",(unsigned int)thread_id));    if(SETJMP(back))    {    if(throw_severity < THROW_EXIT)    {    ONERROR tmp;    SET_ONERROR(tmp,exit_on_error,"Error in handle_error in master object!");    assign_svalue_no_free(sp++, & throw_value);    APPLY_MASTER("handle_error", 1);