pike.git / src / threads.h

version» Context lines:

pike.git/src/threads.h:1:   /* -  * $Id: threads.h,v 1.95 2000/07/07 00:21:48 hubbe Exp $ +  * $Id: threads.h,v 1.96 2000/07/07 13:19:48 grubba Exp $    */   #ifndef THREADS_H   #define THREADS_H      #include "machine.h"   #include "object.h"   #include "error.h"   #include "interpret.h"    - struct Pike_interpreter; -  +    /* Needed for the sigset_t typedef, which is needed for    * the pthread_sigsetmask() prototype on Solaris 2.x.    */   #include <signal.h>      #ifdef HAVE_SYS_TYPES_H   /* Needed for pthread_t on OSF/1 */   #include <sys/types.h>   #endif /* HAVE_SYS_TYPES_H */   #ifdef PIKE_THREADS    -  + /* The fp macro conflicts with Solaris's <pthread.h>. */ + #ifdef fp + #undef fp + #define FRAMEPOINTER_WAS_DEFINED + #endif /* fp */ +    /*    * Decide which type of threads to use    *    * UNIX_THREADS : Unix international threads    * POSIX_THREADS : POSIX standard threads    * SGI_SPROC_THREADS : SGI sproc() based threads    * NT_THREADS : NT threads    */      #ifdef _UNIX_THREADS
pike.git/src/threads.h:334:   #define THREAD_EXITED 1      struct thread_state {    struct Pike_interpreter state;    char swapped;    char status;    COND_T status_change;    THREAD_T id;    struct mapping *thread_local;    struct thread_state *hashlink, **backlink; + #ifdef PROFILING +  long long time_base; + #endif /* PROFILING */   };         #ifndef TH_RETURN_TYPE   #define TH_RETURN_TYPE void *   #endif      #ifndef TH_STDCALL   #define TH_STDCALL   #endif
pike.git/src/threads.h:442:   #define OBJ2THREAD(X) \    ((struct thread_state *)((X)->storage+thread_storage_offset))      #define THREADSTATE2OBJ(X) ((X)->state.thread_id)      #define THREADS_ALLOW() do { \    struct thread_state *_tmp=OBJ2THREAD(Pike_interpreter.thread_id); \    DO_IF_DEBUG({ \    extern int Pike_in_gc; \    if(thread_for_id(th_self()) != Pike_interpreter.thread_id) \ -  fatal("thread_for_id() (or Pike_interpreter.thread_id) failed! %p != %p\n",thread_for_id(th_self()),Pike_interpreter.thread_id); \ +  fatal("thread_for_id() (or Pike_interpreter.thread_id) failed!" \ +  " %p != %p\n", \ +  thread_for_id(th_self()), Pike_interpreter.thread_id); \    if (Pike_in_gc > 50 && Pike_in_gc < 300) \    fatal("Threads allowed during garbage collection.\n"); \    }) \    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(); \    } else {} \
pike.git/src/threads.h:614:   #define th_cleanup()   #define th_init_programs()   #define th_self() ((void*)0)   #define co_signal(X)   #define co_broadcast(X)      #define low_init_threads_disable()   #define init_threads_disable(X)   #define exit_threads_disable(X)    +  + /* Restore the fp macro. */ + #ifdef FRAMEPOINTER_WAS_DEFINED + #define fp Pike_fp + #undef FRAMEPOINTER_WAS_DEFINED + #endif /* FRAMEPOINTER_WAS_DEFINED */ +  +    #endif /* PIKE_THREADS */      #ifndef CHECK_INTERPRETER_LOCK   #define CHECK_INTERPRETER_LOCK() do {} while (0)   #endif      #ifdef __NT__   #ifndef PIKE_DEBUG   #define CheckValidHandle(X) (X)   #else