diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-07-12 09:55:49 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-07-12 09:55:49 +0000 |
commit | b5f365fcfc2111606f9375612e1c3fa32a89df0c (patch) | |
tree | dda549735f9deff99bba4ab40b8159c5b779c7ab | |
parent | e1e6bf1e482f109ead1e62589373d7a165754009 (diff) | |
download | newlib-b5f365fcfc2111606f9375612e1c3fa32a89df0c.zip newlib-b5f365fcfc2111606f9375612e1c3fa32a89df0c.tar.gz newlib-b5f365fcfc2111606f9375612e1c3fa32a89df0c.tar.bz2 |
* 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 836b2b7..864beea 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 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-12 Corinna Vinschen <corinna@vinschen.de> + * fhandler_socket.cc (fhandler_socket::getsockname): Return valid result for unbound sockets. diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h index 1a034a0..8a6326e 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 |