pike.git / src / threads.h

version» Context lines:

pike.git/src/threads.h:1:   /* -  * $Id: threads.h,v 1.92 2000/06/09 22:46:59 mast Exp $ +  * $Id: threads.h,v 1.93 2000/06/23 06:17:58 hubbe Exp $    */   #ifndef THREADS_H   #define THREADS_H      #include "machine.h"   #include "interpret.h"   #include "object.h"   #include "error.h"      /* Needed for the sigset_t typedef, which is needed for
pike.git/src/threads.h:487:    */   #define REVEAL_GLOBAL_VARIABLES() ; } while(0)   #else /* PIKE_DEBUG */   #define HIDE_GLOBAL_VARIABLES()   #define REVEAL_GLOBAL_VARIABLES()   #endif /* PIKE_DEBUG */      #define OBJ2THREAD(X) \    ((struct thread_state *)((X)->storage+thread_storage_offset))    - #define THREADSTATE2OBJ(X) BASEOF((X),object,storage[thread_storage_offset]) + #define THREADSTATE2OBJ(X) ((X)->thread_id)      #define THREADS_ALLOW() do { \    struct thread_state *_tmp=OBJ2THREAD(thread_id); \    DO_IF_DEBUG({ \    extern int Pike_in_gc; \    if(thread_for_id(th_self()) != thread_id) \    fatal("thread_for_id() (or thread_id) failed! %p != %p\n",thread_for_id(th_self()),thread_id); \    if (Pike_in_gc > 50 && Pike_in_gc < 300) \    fatal("Threads allowed during garbage collection.\n"); \    }) \