Add futexes for OpenBSD

This commit is contained in:
Justine Tunney 2022-06-21 05:11:51 -07:00
parent 1216b6e7c7
commit b8e9f71d33
4 changed files with 46 additions and 8 deletions

View file

@ -121,7 +121,7 @@ int pthread_rwlock_unlock(pthread_rwlock_t *);
#define pthread_mutex_unlock(mutex) \
((mutex)->attr == PTHREAD_MUTEX_NORMAL \
? (atomic_store_explicit(&(mutex)->lock, 0, memory_order_relaxed), \
(IsLinux() && \
((IsLinux() || IsOpenbsd()) && \
atomic_load_explicit(&(mutex)->waits, memory_order_relaxed) && \
_pthread_mutex_wake(mutex)), \
0) \