pike.git / src / threads.h

version» Context lines:

pike.git/src/threads.h:1:   /* -  * $Id: threads.h,v 1.68 1999/08/10 00:19:00 mast Exp $ +  * $Id: threads.h,v 1.69 1999/08/30 06:23:51 hubbe Exp $    */   #ifndef THREADS_H   #define THREADS_H      #include "machine.h"   #include "interpret.h"   #include "object.h"   #include "error.h"   #ifdef HAVE_SYS_TYPES_H   /* Needed for pthread_t on OSF/1 */
pike.git/src/threads.h:50:   extern int num_threads;   extern int live_threads;   struct object;   extern size_t thread_stack_size;   extern struct object *thread_id;      #define DEFINE_MUTEX(X) MUTEX_T X         #ifdef POSIX_THREADS +  + #ifdef HAVE_PTHREAD_ATFORK + #define th_atfork(X,Y,Z) pthread_atfork((X),(Y),(Z)) + #define th_atfork_prepare() + #define th_atfork_parent() + #define th_atfork_child() + #else + int th_atfork(void (*)(void),void (*)(void),void (*)(void)); + void th_atfork_prepare(void); + void th_atfork_parent(void); + void th_atfork_child(void); + #endif +    #define THREAD_T pthread_t   #define MUTEX_T pthread_mutex_t   #define mt_init(X) pthread_mutex_init((X),0)   #define mt_lock(X) pthread_mutex_lock(X)   #define mt_trylock(X) pthread_mutex_trylock(X)   #define mt_unlock(X) pthread_mutex_unlock(X)   #define mt_destroy(X) pthread_mutex_destroy(X)      /* SIGH! No setconcurrency in posix threads. This is more or less    * needed to make usable multi-threaded programs on solaris machines