diff options
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/cygwin/types.h | 4 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/version.h | 4 | ||||
-rw-r--r-- | winsup/cygwin/include/pthread.h | 7 |
3 files changed, 13 insertions, 2 deletions
diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/cygwin/types.h index a202d958d..efc076a45 100644 --- a/winsup/cygwin/include/cygwin/types.h +++ b/winsup/cygwin/include/cygwin/types.h @@ -1,6 +1,6 @@ /* types.h - Copyright 2001, 2002, 2003, 2005, 2006, 2010 Red Hat Inc. + Copyright 2001, 2002, 2003, 2005, 2006, 2010, 2011 Red Hat Inc. Written by Robert Collins <rbtcollins@hotmail.com> This file is part of Cygwin. @@ -195,6 +195,7 @@ typedef struct int state; } pthread_once_t; +typedef struct __pthread_spinlock_t {char __dummy;} *pthread_spinlock_t; typedef struct __pthread_rwlock_t {char __dummy;} *pthread_rwlock_t; typedef struct __pthread_rwlockattr_t {char __dummy;} *pthread_rwlockattr_t; @@ -210,6 +211,7 @@ typedef class pthread_mutexattr *pthread_mutexattr_t; typedef class pthread_condattr *pthread_condattr_t; typedef class pthread_cond *pthread_cond_t; typedef class pthread_once pthread_once_t; +typedef class pthread_spinlock *pthread_spinlock_t; typedef class pthread_rwlock *pthread_rwlock_t; typedef class pthread_rwlockattr *pthread_rwlockattr_t; diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 91c3c53d9..58c55f6e3 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -401,12 +401,14 @@ details. */ 235: Export madvise. 236: Export pthread_yield, __xpg_strerror_r. 237: Export strchrnul. + 238: Export pthread_spin_destroy, pthread_spin_init, pthread_spin_lock, + pthread_spin_trylock, pthread_spin_unlock. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 237 +#define CYGWIN_VERSION_API_MINOR 238 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h index 8e35808e1..10a53f3fd 100644 --- a/winsup/cygwin/include/pthread.h +++ b/winsup/cygwin/include/pthread.h @@ -162,6 +162,13 @@ int pthread_mutexattr_setprotocol (pthread_mutexattr_t *, int); int pthread_mutexattr_setpshared (pthread_mutexattr_t *, int); int pthread_mutexattr_settype (pthread_mutexattr_t *, int); +/* Spinlocks */ +int pthread_spin_destroy (pthread_spinlock_t *); +int pthread_spin_init (pthread_spinlock_t *, int); +int pthread_spin_lock (pthread_spinlock_t *); +int pthread_spin_trylock (pthread_spinlock_t *); +int pthread_spin_unlock (pthread_spinlock_t *); + /* RW Locks */ int pthread_rwlock_destroy (pthread_rwlock_t *rwlock); int pthread_rwlock_init (pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr); |