pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.69 1998/04/20 18:53:24 grubba Exp $"); + RCSID("$Id: threads.c,v 1.70 1998/04/23 23:48:17 hubbe 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:151:   #endif      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); */ -  +  if(threads_disabled) +  if(!--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",