pike.git / src / threads.h

version» Context lines:

pike.git/src/threads.h:15:   extern int num_threads;   struct object;   extern struct object *thread_id;      #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) + #define DEFINE_MUTEX(X) MUTEX_T X      extern MUTEX_T interpreter_lock;      #define th_create(ID,fun,arg) pthread_create(ID,&pattr,fun,arg)   #define th_exit(foo) pthread_exit(foo)      #define COND_T pthread_cond_t   #define co_init(X) pthread_cond_init((X), 0)   #define co_wait(COND, MUTEX) pthread_cond_wait((COND), (MUTEX))   #define co_signal(X) pthread_cond_signal(X)
pike.git/src/threads.h:99:   void f_cond_wait(INT32 args);   void f_cond_signal(INT32 args);   void f_cond_broadcast(INT32 args);   void init_cond_obj(struct object *o);   void exit_cond_obj(struct object *o);   void th_init_programs();   void th_cleanup();   /* Prototypes end here */      #else + #define DEFINE_MUTEX(X)   #define mt_init(X)   #define mt_lock(X)   #define mt_unlock(X) -  + #define mt_destroy(X)   #define THREADS_ALLOW()   #define THREADS_DISALLOW()   #define th_init()   #define th_cleanup()   #define th_init_programs()   #endif         extern int threads_disabled;   #endif