1#include <pthreadP.h> 2 3-- Mutex types 4PTHREAD_MUTEX_KIND_MASK PTHREAD_MUTEX_KIND_MASK_NP 5PTHREAD_MUTEX_NORMAL 6PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP 7PTHREAD_MUTEX_ERRORCHECK PTHREAD_MUTEX_ERRORCHECK_NP 8PTHREAD_MUTEX_ADAPTIVE_NP 9 10-- Mutex status 11-- These are hardcoded all over the code; there are no enums/macros for them. 12PTHREAD_MUTEX_DESTROYED -1 13PTHREAD_MUTEX_UNLOCKED 0 14PTHREAD_MUTEX_LOCKED_NO_WAITERS 1 15 16-- For robust mutexes 17PTHREAD_MUTEX_INCONSISTENT 18PTHREAD_MUTEX_NOTRECOVERABLE 19FUTEX_OWNER_DIED 20 21-- For robust and PI mutexes 22FUTEX_WAITERS 23FUTEX_TID_MASK 24 25-- Mutex attributes 26PTHREAD_MUTEX_ROBUST_NORMAL_NP 27PTHREAD_MUTEX_PRIO_INHERIT_NP 28PTHREAD_MUTEX_PRIO_PROTECT_NP 29PTHREAD_MUTEX_PSHARED_BIT 30PTHREAD_MUTEX_PRIO_CEILING_SHIFT 31PTHREAD_MUTEX_PRIO_CEILING_MASK 32 33-- Mutex attribute flags 34PTHREAD_MUTEXATTR_PROTOCOL_SHIFT 35PTHREAD_MUTEXATTR_PROTOCOL_MASK 36PTHREAD_MUTEXATTR_PRIO_CEILING_MASK 37PTHREAD_MUTEXATTR_FLAG_ROBUST 38PTHREAD_MUTEXATTR_FLAG_PSHARED 39PTHREAD_MUTEXATTR_FLAG_BITS 40PTHREAD_MUTEX_NO_ELISION_NP 41 42-- Priority protocols 43PTHREAD_PRIO_NONE 44PTHREAD_PRIO_INHERIT 45PTHREAD_PRIO_PROTECT 46 47-- Condition variable 48-- FIXME Why do macros prefixed with __ cannot be used directly? 49PTHREAD_COND_SHARED_MASK __PTHREAD_COND_SHARED_MASK 50PTHREAD_COND_CLOCK_MONOTONIC_MASK __PTHREAD_COND_CLOCK_MONOTONIC_MASK 51COND_CLOCK_BITS 52-- These values are hardcoded: 53PTHREAD_COND_WREFS_SHIFT 3 54 55-- Rwlock attributes 56PTHREAD_RWLOCK_PREFER_READER_NP 57PTHREAD_RWLOCK_PREFER_WRITER_NP 58PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP 59 60-- Rwlock 61PTHREAD_RWLOCK_WRPHASE 62PTHREAD_RWLOCK_WRLOCKED 63PTHREAD_RWLOCK_READER_SHIFT 64 65-- 'Shared' attribute values 66PTHREAD_PROCESS_PRIVATE 67PTHREAD_PROCESS_SHARED 68