16 #if defined(WINVER) && WINVER >= 0x0600
17 #define MUTEX_IS_WIN32_SRWLOCK
20 #ifndef _POSIX_C_SOURCE
21 #define _POSIX_C_SOURCE 200809L
24 #if defined(_POSIX_READER_WRITER_LOCKS) && _POSIX_READER_WRITER_LOCKS > 0
25 #define MUTEX_IS_PTHREAD_RWLOCK
29 #if defined(MUTEX_IS_WIN32_SRWLOCK)
31 #elif defined(MUTEX_IS_PTHREAD_RWLOCK)
67 #if defined(MUTEX_IS_WIN32_SRWLOCK)
76 #elif defined(MUTEX_IS_PTHREAD_RWLOCK)
78 #define SAFE_PTHREAD(fncall) \
80 if ((fncall) != 0) abort(); \
142 #define MutexLock(x) static_assert(false, "MutexLock declaration missing variable name")
143 #define ReaderMutexLock(x) static_assert(false, "ReaderMutexLock declaration missing variable name")
144 #define WriterMutexLock(x) static_assert(false, "WriterMutexLock declaration missing variable name")
148 #endif // UTIL_MUTEX_H_