mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
(__lll_robust_lock_wait): Also set FUTEX_WAITERS buit if we got the mutex. (__lll_robust_timedlock_wait): Likewise.
This commit is contained in:
@@ -42,7 +42,9 @@ __lll_robust_lock_wait (int *futex)
|
||||
|
||||
lll_futex_wait (futex, newval);
|
||||
}
|
||||
while ((oldval = atomic_compare_and_exchange_val_acq (futex, tid, 0)) != 0);
|
||||
while ((oldval = atomic_compare_and_exchange_val_acq (futex,
|
||||
tid | FUTEX_WAITERS,
|
||||
0)) != 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -89,7 +91,7 @@ __lll_robust_timedlock_wait (int *futex, const struct timespec *abstime)
|
||||
|
||||
lll_futex_timed_wait (futex, newval, &rt);
|
||||
}
|
||||
while (atomic_compare_and_exchange_bool_acq (futex, tid, 0));
|
||||
while (atomic_compare_and_exchange_bool_acq (futex, tid | FUTEX_WAITERS, 0));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user