diff options
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/cygwin/types.h | 4 | ||||
-rw-r--r-- | winsup/cygwin/include/pthread.h | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/cygwin/types.h index 85ee7c7b0..b01ae9593 100644 --- a/winsup/cygwin/include/cygwin/types.h +++ b/winsup/cygwin/include/cygwin/types.h @@ -184,6 +184,8 @@ typedef struct __pthread_attr_t {char __dummy;} *pthread_attr_t; typedef struct __pthread_mutexattr_t {char __dummy;} *pthread_mutexattr_t; typedef struct __pthread_condattr_t {char __dummy;} *pthread_condattr_t; typedef struct __pthread_cond_t {char __dummy;} *pthread_cond_t; +typedef struct __pthread_barrierattr_t {char __dummy;} *pthread_barrierattr_t; +typedef struct __pthread_barrier_t {char __dummy;} *pthread_barrier_t; /* These variables are not user alterable. This means you!. */ typedef struct @@ -207,6 +209,8 @@ typedef class pthread_attr *pthread_attr_t; typedef class pthread_mutexattr *pthread_mutexattr_t; typedef class pthread_condattr *pthread_condattr_t; typedef class pthread_cond *pthread_cond_t; +typedef class pthread_barrier *pthread_barrier_t; +typedef class pthread_barrierattr *pthread_barrierattr_t; typedef class pthread_once pthread_once_t; typedef class pthread_spinlock *pthread_spinlock_t; typedef class pthread_rwlock *pthread_rwlock_t; diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h index 9ad8b6662..84e0a147a 100644 --- a/winsup/cygwin/include/pthread.h +++ b/winsup/cygwin/include/pthread.h @@ -62,6 +62,7 @@ extern "C" /* process is the default */ #define PTHREAD_SCOPE_PROCESS 0 #define PTHREAD_SCOPE_SYSTEM 1 +#define PTHREAD_BARRIER_SERIAL_THREAD (-1) /* Register Fork Handlers */ int pthread_atfork (void (*)(void), void (*)(void), void (*)(void)); @@ -133,6 +134,17 @@ int pthread_condattr_init (pthread_condattr_t *); int pthread_condattr_setclock (pthread_condattr_t *, clockid_t); int pthread_condattr_setpshared (pthread_condattr_t *, int); +/* Barriers */ +int pthread_barrierattr_init (pthread_barrierattr_t *); +int pthread_barrierattr_setpshared (pthread_barrierattr_t *, int); +int pthread_barrierattr_getpshared (const pthread_barrierattr_t *, int *); +int pthread_barrierattr_destroy (pthread_barrierattr_t *); +int pthread_barrier_init (pthread_barrier_t *, + const pthread_barrierattr_t *, unsigned); +int pthread_barrier_destroy (pthread_barrier_t *); +int pthread_barrier_wait (pthread_barrier_t *); + +/* Threads */ int pthread_create (pthread_t *, const pthread_attr_t *, void *(*)(void *), void *); int pthread_detach (pthread_t); |