pike.git / src / threads.h

version» Context lines:

pike.git/src/threads.h:1: Inside #if undefined(THREADS_H)
  #ifndef THREADS_H   #define THREADS_H      #include "machine.h"   #include "interpret.h"   #include "error.h"      #ifdef _REENTRANT    + /* +  * Decide which type of threads to use +  * +  * UNIX_THREADS : Unix international threads +  * POSIX_THREADS : POSIX standard threads +  * SGI_SPROC_THREADS : SGI sproc() based threads +  */ +  + #ifdef _UNIX_THREADS   #ifdef HAVE_THREAD_H   #define UNIX_THREADS   #include <thread.h>   #undef HAVE_PTHREAD_H   #undef HAVE_THREAD_H   #endif -  + #endif /* _UNIX_THREADS */    -  + #ifdef _MIT_POSIX_THREADS   #ifdef HAVE_PTHREAD_H   #define POSIX_THREADS   #include <pthread.h>   #undef HAVE_PTHREAD_H   #endif -  + #endif /* _MIT_POSIX_THREADS */    - #ifdef SPROC_THREADS + #ifdef _SGI_SPROC_THREADS   /* Not supported yet */ - #undef SPROC_THREADS + #undef SGI_SPROC_THREADS   #undef HAVE_SPROC - #endif /* SPROC_THREADS */ + #endif /* _SGI_SPROC_THREADS */         extern int num_threads;   struct object;   extern struct object *thread_id;      #define DEFINE_MUTEX(X) MUTEX_T X         #ifdef POSIX_THREADS
pike.git/src/threads.h:101:   #define COND_T cond_t   #define co_init(X) cond_init((X),USYNC_THREAD,0)   #define co_wait(COND, MUTEX) cond_wait((COND), (MUTEX))   #define co_signal(X) cond_signal(X)   #define co_broadcast(X) cond_broadcast(X)   #define co_destroy(X) cond_destroy(X)         #endif /* UNIX_THREADS */    - #ifdef SPROC_THREADS + #ifdef SGI_SPROC_THREADS      /*    * Not fully supported yet    */   #define THREAD_T int      #define MUTEX_T ulock_t   #define mt_init(X) (usinitlock(((*X) = usnewlock(/*********/))))   #define mt_lock(X) ussetlock(*X)   #define mt_unlock(X) usunsetlock(*X)
pike.git/src/threads.h:126:   #define PIKE_SPROC_FLAGS (PR_SADDR|PR_SFDS|PR_SDIR|PS_SETEXITSIG)   #define th_create(ID, fun, arg) (((*(ID)) = sproc(fun, PIKE_SPROC_FLAGS, arg)) == -1)   #define th_exit(X) exit(X)   #define th_self() getpid()   #define th_yield() sginap(0)      /*    * No cond_vars yet    */    - #endif /* SPROC_THREADS */ + #endif /* SGI_SPROC_THREADS */      extern MUTEX_T interpreter_lock;         struct svalue;   struct frame;      struct thread_state {    int swapped;    struct svalue *sp,*evaluator_stack;