mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 02:38:31 +00:00
Add futexes for OpenBSD
This commit is contained in:
parent
1216b6e7c7
commit
b8e9f71d33
4 changed files with 46 additions and 8 deletions
|
@ -40,7 +40,7 @@ int(pthread_mutex_unlock)(pthread_mutex_t *mutex) {
|
|||
// fallthrough
|
||||
case PTHREAD_MUTEX_NORMAL:
|
||||
atomic_store_explicit(&mutex->lock, 0, memory_order_relaxed);
|
||||
if (IsLinux() &&
|
||||
if ((IsLinux() || IsOpenbsd()) &&
|
||||
atomic_load_explicit(&mutex->waits, memory_order_relaxed)) {
|
||||
_pthread_mutex_wake(mutex);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue