pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.53 1998/01/25 08:25:16 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.54 1998/01/26 20:00:01 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"   #include "builtin_functions.h"   #include "constants.h"   #include "program.h"   #include "gc.h" -  + #include "main.h"      #ifdef __NT__      #ifdef DEBUG   static int IsValidHandle(HANDLE h)   {    __try {    HANDLE ret;    if(DuplicateHandle(GetCurrentProcess(),    h,
pike.git/src/threads.c:207:    sp-1);    pop_stack();    }       ((struct thread_state *)(thread_id->storage))->status=THREAD_EXITED;    co_signal(& ((struct thread_state *)(thread_id->storage))->status_change);       free((char *)data); /* Moved by per, to avoid some bugs.... */    UNSETJMP(back);    -  destruct(thread_id); +     THREADS_FPRINTF((stderr,"THREADS_ALLOW() Thread %08x done\n",    (unsigned int)thread_id));       free_object(thread_id);    thread_id=0;    cleanup_interpret();    num_threads--;    if(!num_threads && threads_evaluator_callback)    {    remove_callback(threads_evaluator_callback);