pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   #include "global.h" - RCSID("$Id: threads.c,v 1.87 1999/05/08 04:46:07 hubbe Exp $"); + RCSID("$Id: threads.c,v 1.88 1999/05/12 05:27:48 hubbe Exp $");      int num_threads = 1;   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:17:   #include "gc.h"   #include "main.h"      int live_threads = 0;   COND_T live_threads_change;   COND_T threads_disabled_change;   size_t thread_stack_size=1024 * 1204;      #ifdef __NT__    + int low_nt_create_thread(unsigned stack_size, +  unsigned (TH_STDCALL *fun)(void *), +  void *arg, +  unsigned *id) + { +  HANDLE h=_beginthreadex(NULL, stack_size, fun, arg, 0, id); +  if(h) +  { +  CloseHandle(h); +  return 0; +  } +  else +  { +  return 1; +  } + } +    #ifdef PIKE_DEBUG   static int IsValidHandle(HANDLE h)   {    __try {    HANDLE ret;    if(DuplicateHandle(GetCurrentProcess(),    h,    GetCurrentProcess(),    &ret,    NULL,