Unbloat the build

This change resurrects ae5d06dc53
This commit is contained in:
Justine Tunney 2022-08-11 00:15:29 -07:00
parent 2d64b9994b
commit 10fd8bdb70
1397 changed files with 1204 additions and 5031 deletions

View file

@ -19,6 +19,7 @@
#include "libc/assert.h"
#include "libc/bits/atomic.h"
#include "libc/calls/calls.h"
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/intrin/kprintf.h"
#include "libc/intrin/pthread.h"
@ -44,8 +45,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() || IsOpenbsd()) &&
atomic_load_explicit(&mutex->waits, memory_order_relaxed) > 0) {
if (atomic_load_explicit(&mutex->waits, memory_order_relaxed) > 0) {
_pthread_mutex_wake(mutex);
}
return 0;