pike.git / src / threads.h

version» Context lines:

pike.git/src/threads.h:1:   /* -  * $Id: threads.h,v 1.116 2002/09/14 03:03:05 mast Exp $ +  * $Id: threads.h,v 1.117 2003/01/08 18:11:03 mast Exp $    */   #ifndef THREADS_H   #define THREADS_H      #include "machine.h"   #include "object.h"   #include "pike_error.h"   #include "interpret.h"      /* Needed for the sigset_t typedef, which is needed for
pike.git/src/threads.h:440:   #ifndef VERBOSE_THREADS_DEBUG   #define THREADS_FPRINTF(L,X)   #else   #define THREADS_FPRINTF(L,X) do { \    if ((VERBOSE_THREADS_DEBUG + 0) >= (L)) fprintf X; \    } while(0)   #endif /* VERBOSE_THREADS_DEBUG */      #ifdef THREAD_TRACE   PMOD_EXPORT extern int t_flag; - #define SWAP_OUT_TRACE(_tmp) do { (_tmp)->status.t_flag = t_flag; } while(0) - #define SWAP_IN_TRACE(_tmp) do { t_flag = (_tmp)->status.t_flag; } while(0) + #define SWAP_OUT_TRACE(_tmp) do { (_tmp)->state.t_flag = t_flag; } while(0) + #define SWAP_IN_TRACE(_tmp) do { t_flag = (_tmp)->state.t_flag; } while(0)   #else /* !THREAD_TRACE */   #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      #define SWAP_OUT_THREAD(_tmp) do { \    (_tmp)->state=Pike_interpreter; \    (_tmp)->swapped=1; \    DO_IF_PROFILING( (_tmp)->time_base += gethrtime() ; ) \ -  +  SWAP_OUT_TRACE(_tmp); \    } while(0)      #define SWAP_IN_THREAD(_tmp) do { \    (_tmp)->swapped=0; \    Pike_interpreter=(_tmp)->state; \    DO_IF_USE_CLOCK_FOR_SLICES (thread_start_clock = 0); \    DO_IF_PROFILING( Pike_interpreter.time_base -= gethrtime();) \ -  +  SWAP_IN_TRACE(_tmp); \    } while(0)      #define SWAP_OUT_CURRENT_THREAD() \    do {\    struct thread_state *_tmp=OBJ2THREAD(Pike_interpreter.thread_id); \    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() \