diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-07-12 13:55:47 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-07-12 13:55:47 +0400 |
commit | 26339428587309790f56ba4127f9f38166928815 (patch) | |
tree | de5760fb745f36dc3f83521778a1f54473e04b17 | |
parent | a9ad8f8ca5b89fb8d790f72f0d8b185b116df211 (diff) |
* include/pthread.h: Define PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT and
PTHREAD_PRIO_PROTECT only if _POSIX_THREAD_PRIO_INHERIT is defined.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/include/pthread.h | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 14cc57b56..a91fbf430 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2006-07-12 Corinna Vinschen <corinna@vinschen.de> + + * include/pthread.h: Define PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT and + PTHREAD_PRIO_PROTECT only if _POSIX_THREAD_PRIO_INHERIT is defined. + 2006-07-10 Corinna Vinschen <corinna@vinschen.de> * libc/inet_addr.c: Define __INSIDE_CYGWIN_NET__. diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h index 1a034a0ae..8a6326ee7 100644 --- a/winsup/cygwin/include/pthread.h +++ b/winsup/cygwin/include/pthread.h @@ -60,9 +60,11 @@ extern "C" #define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP (pthread_mutex_t)20 #define PTHREAD_MUTEX_INITIALIZER PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP #define PTHREAD_ONCE_INIT { PTHREAD_MUTEX_INITIALIZER, 0 } -#define PTHREAD_PRIO_INHERIT -#define PTHREAD_PRIO_NONE -#define PTHREAD_PRIO_PROTECT +#if defined(_POSIX_THREAD_PRIO_INHERIT) && _POSIX_THREAD_PRIO_INHERIT >= 0 +#define PTHREAD_PRIO_NONE 0 +#define PTHREAD_PRIO_INHERIT 1 +#define PTHREAD_PRIO_PROTECT 2 +#endif #define PTHREAD_PROCESS_SHARED 1 #define PTHREAD_PROCESS_PRIVATE 0 #define PTHREAD_RWLOCK_INITIALIZER (pthread_rwlock_t)22 |