pike.git / src / threads.h

version» Context lines:

pike.git/src/threads.h:1:   /* -  * $Id: threads.h,v 1.59 1998/11/20 19:33:46 hubbe Exp $ +  * $Id: threads.h,v 1.60 1998/11/22 11:03:23 hubbe Exp $    */   #ifndef THREADS_H   #define THREADS_H      #include "machine.h"   #include "interpret.h"   #include "object.h"   #include "error.h"   #ifdef HAVE_SYS_TYPES_H   /* Needed for pthread_t on OSF/1 */
pike.git/src/threads.h:343:   #define SWAP_OUT_TRACE(_tmp)   #define SWAP_IN_TRACE(_tmp)   #endif /* THREAD_TRACE */      #if defined(PROFILING) && defined(HAVE_GETHRTIME)   #define DO_IF_PROFILING(X) X   #else   #define DO_IF_PROFILING(X)   #endif    - #ifdef DEBUG + #ifdef PIKE_DEBUG   #define DO_IF_DEBUG(X) X   #else   #define DO_IF_DEBUG(X)   #endif      #define SWAP_OUT_THREAD(_tmp) do { \    (_tmp)->swapped=1; \    (_tmp)->evaluator_stack=evaluator_stack;\    (_tmp)->evaluator_stack_malloced=evaluator_stack_malloced;\    (_tmp)->fp=fp;\
pike.git/src/threads.h:396:    SWAP_OUT_THREAD(_tmp); \    THREADS_FPRINTF(1, (stderr, "SWAP_OUT_CURRENT_THREAD() %s:%d t:%08x\n", \    __FILE__, __LINE__, (unsigned int)_tmp->thread_id)) \      #define SWAP_IN_CURRENT_THREAD() \    THREADS_FPRINTF(1, (stderr, "SWAP_IN_CURRENT_THREAD() %s:%d ... t:%08x\n", \    __FILE__, __LINE__, (unsigned int)_tmp->thread_id)); \    SWAP_IN_THREAD(_tmp);\    } while(0)    - #if defined(DEBUG) && ! defined(DONT_HIDE_GLOBALS) + #if defined(PIKE_DEBUG) && ! defined(DONT_HIDE_GLOBALS)   /* Note that scalar types are used in place of pointers and vice versa    * below. This is intended to cause compiler warnings/errors if    * there is an attempt to use the global variables in an unsafe    * environment.    */   #define HIDE_GLOBAL_VARIABLES() do { \    int sp = 0, evaluator_stack = 0, mark_sp = 0, mark_stack = 0, fp = 0; \    void *evaluator_stack_malloced = NULL, *mark_stack_malloced = NULL; \    int recoveries = 0, thread_id = 0; \    int error = 0, xalloc = 0, low_my_putchar = 0, low_my_binary_strcat = 0; \    int low_make_buf_space = 0, pop_n_elems = 0; \    int push_sp_mark = 0, pop_sp_mark = 0, threads_disabled = 1      /* Note that the semi-colon below is needed to add an empty statement    * in case there is a label before the macro.    */   #define REVEAL_GLOBAL_VARIABLES() ; } while(0) - #else /* DEBUG */ + #else /* PIKE_DEBUG */   #define HIDE_GLOBAL_VARIABLES()   #define REVEAL_GLOBAL_VARIABLES() - #endif /* DEBUG */ + #endif /* PIKE_DEBUG */         #define THREADS_ALLOW() do { \    struct thread_state *_tmp=(struct thread_state *)thread_id->storage; \    if(num_threads > 1 && !threads_disabled) { \    SWAP_OUT_THREAD(_tmp); \    THREADS_FPRINTF(1, (stderr, "THREADS_ALLOW() %s:%d t:%08x(#%d)\n", \    __FILE__, __LINE__, \    (unsigned int)_tmp->thread_id, live_threads)); \    mt_unlock(& interpreter_lock); \
pike.git/src/threads.h:552:   #define co_signal(X)   #define co_broadcast(X)      #define low_init_threads_disable()   #define init_threads_disable(X)   #define exit_threads_disable(X)      #endif /* _REENTRANT */      #ifdef __NT__ - #ifndef DEBUG + #ifndef PIKE_DEBUG   #define CheckValidHandle(X) 0   #else   void CheckValidHandle(HANDLE h);   #endif   #endif      extern int threads_disabled;      #endif /* THREADS_H */