diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-08-14 07:38:41 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-08-14 07:38:41 +0000 |
commit | c67c02731b6507c5351bca70451441d9a26113ef (patch) | |
tree | afe8d99e55401fe7955475ab97a497cae2e23ab2 /nptl/pthreadP.h | |
parent | 39762d6a5c0e378f20b28da7450868bfef588fb0 (diff) |
Updated to fedora-glibc-20070814T0725cvs/fedora-glibc-2_6_90-9
Diffstat (limited to 'nptl/pthreadP.h')
-rw-r--r-- | nptl/pthreadP.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 82c0f1ecf6..17b6492ad8 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -96,9 +96,22 @@ enum PTHREAD_MUTEX_PP_ADAPTIVE_NP = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_ADAPTIVE_NP }; +#define PTHREAD_MUTEX_PSHARED_BIT 128 #define PTHREAD_MUTEX_TYPE(m) \ - ((m)->__data.__kind) + ((m)->__data.__kind & 127) + +#if LLL_PRIVATE == 0 && LLL_SHARED == 128 +# define PTHREAD_MUTEX_PSHARED(m) \ + ((m)->__data.__kind & 128) +#else +# define PTHREAD_MUTEX_PSHARED(m) \ + (((m)->__data.__kind & 128) ? LLL_SHARED : LLL_PRIVATE) +#endif + +/* The kernel when waking robust mutexes on exit never uses + FUTEX_PRIVATE_FLAG FUTEX_WAKE. */ +#define PTHREAD_ROBUST_MUTEX_PSHARED(m) LLL_SHARED /* Ceiling in __data.__lock. __data.__lock is signed, so don't use the MSB bit in there, but in the mask also include that bit, |