Remove __threaded variable

This commit is contained in:
Justine Tunney 2024-07-28 23:43:22 -07:00
parent 01b09bc817
commit cf1559c448
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
15 changed files with 51 additions and 71 deletions

View file

@ -39,7 +39,6 @@ static int malloc_wipe(MLOCK_T *lk) {
}
static int malloc_lock(MLOCK_T *lk) {
if (!__threaded) return 0;
for (;;) {
if (!atomic_exchange_explicit(lk, 1, memory_order_acquire))
break;
@ -51,7 +50,6 @@ static int malloc_lock(MLOCK_T *lk) {
}
static int malloc_unlock(MLOCK_T *lk) {
if (!__threaded) return 0;
atomic_store_explicit(lk, 0, memory_order_release);
return 0;
}
@ -66,13 +64,11 @@ static int malloc_wipe(MLOCK_T *lk) {
}
static int malloc_lock(MLOCK_T *lk) {
if (!__threaded) return 0;
nsync_mu_lock(lk);
return 0;
}
static int malloc_unlock(MLOCK_T *lk) {
if (!__threaded) return 0;
nsync_mu_unlock(lk);
return 0;
}