pike.git / src / pike_threadlib.h

version» Context lines:

pike.git/src/pike_threadlib.h:15:      #include "global.h"   #include "pike_embed.h"   #include "pike_rusage.h"      /* 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
pike.git/src/pike_threadlib.h:96:   #endif   #endif /* USE_DARWIN_THREADS_WITHOUT_MACH */      /* Restore the fp macro. */   #ifdef FRAMEPOINTER_WAS_DEFINED   #define fp Pike_fp   #undef FRAMEPOINTER_WAS_DEFINED   #endif /* FRAMEPOINTER_WAS_DEFINED */      PMOD_EXPORT extern int threads_disabled; + PMOD_EXPORT extern cpu_time_t threads_disabled_acc_time; + PMOD_EXPORT extern cpu_time_t threads_disabled_start;   PMOD_EXPORT extern ptrdiff_t thread_storage_offset;   PMOD_EXPORT extern struct program *thread_id_prog;   PMOD_EXPORT extern int num_threads;   PMOD_EXPORT extern size_t thread_stack_size;      PMOD_EXPORT void thread_low_error (int errcode, const char *cmd,    const char *fname, int lineno);      #define LOW_THREAD_CHECK_NONZERO_ERROR(CALL) do { \    int thread_errcode_ = (CALL); \
pike.git/src/pike_threadlib.h:295:   /*    * No cond_vars yet    */      #endif /* SGI_SPROC_THREADS */         #ifdef NT_THREADS      #include <process.h> - #include <windows.h> +       #define LOW_THREAD_CHECK_ZERO_ERROR(CALL) do { \    if (!(CALL)) \    thread_low_error(GetLastError(), TOSTR(CALL), \    __FILE__, __LINE__); \    } while (0)      #define THREAD_T unsigned   #define th_setconcurrency(X)   #define th_create(ID,fun,arg) low_nt_create_thread(thread_stack_size,fun, arg,ID)
pike.git/src/pike_threadlib.h:401: Inside #if undefined(low_th_yield) and #if defined(HAVE_THR_YIELD)
  #ifndef low_th_yield   #ifdef HAVE_THR_YIELD   #define low_th_yield() thr_yield()   #else   #define low_th_yield() 0   #define HAVE_NO_YIELD   #endif   #endif      #ifndef th_equal - #define th_equal(X,Y) (!MEMCMP(&(X),&(Y),sizeof(THREAD_T))) + #define th_equal(X,Y) (!memcmp(&(X),&(Y),sizeof(THREAD_T)))   #endif      #ifndef th_hash   #define th_hash(X) hashmem((unsigned char *)&(X),sizeof(THREAD_T), 16)   #endif      PMOD_EXPORT int co_wait_timeout(COND_T *c, PIKE_MUTEX_T *m, long s, long nanos);      #ifndef CONFIGURE_TEST   
pike.git/src/pike_threadlib.h:674:      #define th_atfork(X,Y,Z)   #define th_atfork_prepare()   #define th_atfork_parent()   #define th_atfork_child()      #define th_setconcurrency(X)   #define DEFINE_MUTEX(X)   #define DEFINE_IMUTEX(X)   #define init_interleave_mutex(X) + #define exit_interleave_mutex(X)   #define LOCK_IMUTEX(X)   #define UNLOCK_IMUTEX(X)   #define mt_init(X)   #define mt_lock(X)   #define mt_unlock(X)   #define mt_destroy(X)   #define THREADS_ALLOW()   #define THREADS_DISALLOW()   #define THREADS_ALLOW_UID()   #define THREADS_DISALLOW_UID()
pike.git/src/pike_threadlib.h:718:   #endif      #ifdef __NT__   #if !defined (PIKE_DEBUG) || defined (CONFIGURE_TEST)   #define CheckValidHandle(X) (X)   #else   PMOD_EXPORT HANDLE CheckValidHandle(HANDLE h);   #endif   #endif    - #ifndef NO_PIKE_SHORTHAND - #define MUTEX_T PIKE_MUTEX_T - #endif -  -  +    /* Initializer macros for static mutex and condition variables */   #ifdef PTHREAD_MUTEX_INITIALIZER   #define HAS_STATIC_MUTEX_INIT   #define STATIC_MUTEX_INIT = PTHREAD_MUTEX_INITIALIZER   #else   #define STATIC_MUTEX_INIT   #endif   #ifdef PTHREAD_COND_INITIALIZER   #define HAS_STATIC_COND_INIT   #define STATIC_COND_INIT = PTHREAD_COND_INITIALIZER