From 26339428587309790f56ba4127f9f38166928815 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 12 Jul 2006 09:55:47 +0000 Subject: * include/pthread.h: Define PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT and PTHREAD_PRIO_PROTECT only if _POSIX_THREAD_PRIO_INHERIT is defined. --- winsup/cygwin/include/pthread.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/include/pthread.h') 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 -- cgit v1.2.3