pike.git / src / threads.h

version» Context lines:

pike.git/src/threads.h:1:   /* -  * $Id: threads.h,v 1.72 2000/02/04 21:46:15 grubba Exp $ +  * $Id: threads.h,v 1.73 2000/02/17 00:31:16 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:308:      struct thread_state {    char swapped;    char status;    COND_T status_change;    THREAD_T id;    struct thread_state *hashlink, **backlink;    struct mapping *thread_local;       /* Swapped variables */ -  struct svalue *sp,*evaluator_stack; -  struct svalue **mark_sp,**mark_stack; -  struct pike_frame *fp; +  struct svalue *Pike_sp,*Pike_evaluator_stack; +  struct svalue **Pike_mark_sp,**Pike_mark_stack; +  struct pike_frame *Pike_fp;    int evaluator_stack_malloced;    int mark_stack_malloced;    JMP_BUF *recoveries;    struct object * thread_id; -  char *stack_top; +  char *Pike_stack_top;    DO_IF_SECURITY(struct object *current_creds;)      #ifdef PROFILING   #ifdef HAVE_GETHRTIME    long long accounted_time;    long long time_base;   #endif   #endif      #ifdef THREAD_TRACE
pike.git/src/threads.h:382:   #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)->swapped=1; \ -  (_tmp)->evaluator_stack=evaluator_stack;\ +  (_tmp)->Pike_evaluator_stack=Pike_evaluator_stack;\    (_tmp)->evaluator_stack_malloced=evaluator_stack_malloced;\ -  (_tmp)->fp=fp;\ -  (_tmp)->mark_sp=mark_sp;\ -  (_tmp)->mark_stack=mark_stack;\ +  (_tmp)->Pike_fp=Pike_fp;\ +  (_tmp)->Pike_mark_sp=Pike_mark_sp;\ +  (_tmp)->Pike_mark_stack=Pike_mark_stack;\    (_tmp)->mark_stack_malloced=mark_stack_malloced;\    (_tmp)->recoveries=recoveries;\ -  (_tmp)->sp=sp; \ -  (_tmp)->stack_top=stack_top; \ +  (_tmp)->Pike_sp=Pike_sp; \ +  (_tmp)->Pike_stack_top=Pike_stack_top; \    (_tmp)->thread_id=thread_id;\    DO_IF_PROFILING( (_tmp)->accounted_time=accounted_time; ) \    DO_IF_PROFILING( (_tmp)->time_base = gethrtime() - time_base; ) \    DO_IF_SECURITY( (_tmp)->current_creds = current_creds ;) \    SWAP_OUT_TRACE(_tmp); \    } while(0)      #define SWAP_IN_THREAD(_tmp) do {\    (_tmp)->swapped=0; \ -  evaluator_stack=(_tmp)->evaluator_stack;\ +  Pike_evaluator_stack=(_tmp)->Pike_evaluator_stack;\    evaluator_stack_malloced=(_tmp)->evaluator_stack_malloced;\ -  fp=(_tmp)->fp;\ -  mark_sp=(_tmp)->mark_sp;\ -  mark_stack=(_tmp)->mark_stack;\ +  Pike_fp=(_tmp)->Pike_fp;\ +  Pike_mark_sp=(_tmp)->Pike_mark_sp;\ +  Pike_mark_stack=(_tmp)->Pike_mark_stack;\    mark_stack_malloced=(_tmp)->mark_stack_malloced;\    recoveries=(_tmp)->recoveries;\ -  sp=(_tmp)->sp;\ -  stack_top=(_tmp)->stack_top;\ +  Pike_sp=(_tmp)->Pike_sp;\ +  Pike_stack_top=(_tmp)->Pike_stack_top;\    thread_id=(_tmp)->thread_id;\    DO_IF_PROFILING( accounted_time=(_tmp)->accounted_time; ) \    DO_IF_PROFILING( time_base = gethrtime() - (_tmp)->time_base; ) \    DO_IF_SECURITY( current_creds = (_tmp)->current_creds ;) \    SWAP_IN_TRACE(_tmp); \    } while(0)      #define SWAP_OUT_CURRENT_THREAD() \    do {\    struct thread_state *_tmp=OBJ2THREAD(thread_id); \
pike.git/src/threads.h:436:    SWAP_IN_THREAD(_tmp);\    } while(0)      #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; \ +  int Pike_sp = 0, Pike_evaluator_stack = 0, Pike_mark_sp = 0, Pike_mark_stack = 0, Pike_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)
pike.git/src/threads.h:534:   #define ASSERT_THREAD_SWAPPED_IN() do { \    struct thread_state *_tmp=thread_state_for_id(th_self()); \    if(_tmp->swapped) fatal("Thread is not swapped in!\n"); \    }while(0)      #else   #define ASSERT_THREAD_SWAPPED_IN()   #endif      /* Prototypes begin here */ - int low_nt_create_thread(unsigned stack_size, + int low_nt_create_thread(unsigned Pike_stack_size,    unsigned (TH_STDCALL *func)(void *),    void *arg,    unsigned *id);   struct thread_starter;   struct thread_local;   void low_init_threads_disable(void);   void init_threads_disable(struct object *o);   void exit_threads_disable(struct object *o);   void init_interleave_mutex(IMUTEX_T *im);   void exit_interleave_mutex(IMUTEX_T *im);