mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 11:12:27 +00:00
Fix package.sh build error
This commit is contained in:
parent
642e9cb91a
commit
efb3a34608
3 changed files with 12 additions and 18 deletions
8
third_party/dlmalloc/locks.inc
vendored
8
third_party/dlmalloc/locks.inc
vendored
|
@ -40,8 +40,12 @@ static int malloc_wipe(MLOCK_T *lk) {
|
|||
|
||||
static int malloc_lock(MLOCK_T *lk) {
|
||||
if (!__threaded) return 0;
|
||||
while (atomic_exchange_explicit(lk, 1, memory_order_acquire)) {
|
||||
pthread_pause_np();
|
||||
for (;;) {
|
||||
if (!atomic_exchange_explicit(lk, 1, memory_order_acquire))
|
||||
break;
|
||||
for (;;)
|
||||
if (!atomic_load_explicit(lk, memory_order_relaxed))
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue