pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.163 2001/09/06 00:20:59 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.164 2001/09/18 22:59:57 hubbe 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:74: Inside #if defined(__NT__)
   return 0;    }    else    {    return 1;    }   }         #ifdef PIKE_DEBUG - static int IsValidHandle(HANDLE h) - { -  __try { -  HANDLE ret; -  if(DuplicateHandle(GetCurrentProcess(), -  h, -  GetCurrentProcess(), -  &ret, -  0, -  0, -  DUPLICATE_SAME_ACCESS)) -  { -  CloseHandle(ret); -  } -  } -  -  __except (1) { -  return 0; -  } -  -  return 1; - } -  - PMOD_EXPORT HANDLE CheckValidHandle(HANDLE h) - { -  if(!IsValidHandle(h)) -  fatal("Invalid handle!\n"); -  return h; - } -  + PMOD_EXPORT HANDLE CheckValidHandle(HANDLE h);   #endif      #endif      #ifdef SIMULATE_COND_WITH_EVENT   PMOD_EXPORT int co_wait(COND_T *c, MUTEX_T *m)   {    struct cond_t_queue me;    event_init(&me.event);    me.next=0;
pike.git/src/threads.c:1837:   void th_cleanup(void)   {    th_running = 0;       if(Pike_interpreter.thread_id)    {    thread_table_delete(Pike_interpreter.thread_id);    destruct(Pike_interpreter.thread_id);    free_object(Pike_interpreter.thread_id);    Pike_interpreter.thread_id=0; +  destruct_objects_to_destruct_cb();    }       if(mutex_key)    {    free_program(mutex_key);    mutex_key=0;    }       if(thread_local_prog)    {