pike.git / src / threads.h

version» Context lines:

pike.git/src/threads.h:1:   /* -  * $Id: threads.h,v 1.51 1998/08/26 18:43:49 marcus Exp $ +  * $Id: threads.h,v 1.52 1998/08/31 12:48:33 grubba 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:80:   extern pthread_attr_t small_pattr;      #define th_create(ID,fun,arg) pthread_create(ID,&pattr,fun,arg)   #define th_create_small(ID,fun,arg) pthread_create(ID,&small_pattr,fun,arg)   #define th_exit(foo) pthread_exit(foo)   #define th_self() pthread_self()   #define th_kill(ID,sig) pthread_kill((ID),(sig))   #ifdef HAVE_PTHREAD_COND_INIT   #define COND_T pthread_cond_t    - #ifdef HAVE_PTHREAD_CONDATTR_DEFAULT + #ifdef HAVE_PTHREAD_CONDATTR_DEFAULT_AIX + /* AIX wants the & ... */   #define co_init(X) pthread_cond_init((X), &pthread_condattr_default) - #else + #else /* !HAVE_PTHREAD_CONDATTR_DEFAULT_AIX */ + #ifdef HAVE_PTHREAD_CONDATTR_DEFAULT + /* ... while FreeBSD doesn't. */ + #define co_init(X) pthread_cond_init((X), pthread_condattr_default) + #else /* !HAVE_PTHREAD_CONDATTR_DEFAULT */   #define co_init(X) pthread_cond_init((X), 0)   #endif /* HAVE_PTHREAD_CONDATTR_DEFAULT */ -  + #endif /* HAVE_PTHREAD_CONDATTR_DEFAULT_AIX */      #define co_wait(COND, MUTEX) pthread_cond_wait((COND), (MUTEX))   #define co_signal(X) pthread_cond_signal(X)   #define co_broadcast(X) pthread_cond_broadcast(X)   #define co_destroy(X) pthread_cond_destroy(X)   #else   #error No way to make cond-vars   #endif /* HAVE_PTHREAD_COND_INIT */      #endif /* POSIX_THREADS */