with my second suggestion: the predicate
should only test the value and do nothing else, and actually trying to
decrement the semaphore is left up to the caller _M_acquire(), which must
then retry __atomic_wait_address if the compare-exchange fails.
--
Nate Eldredge
n...@thatsmathematics.com
On Mon, 11 Dec 2023, Nate Eldredge wrote:
To fix, we need something like `__args._M_old = __val;` inside the loop in
__atomic_wait_address(), so that we always wait on the exact value that the
predicate __pred() rejected. Again, there are similar instances in
atomic_timed_wait.h.
Thinking
/bugzilla/show_bug.cgi?id=104928. The patch proposed
here would fix it, though.)
--
Nate Eldredge
n...@thatsmathematics.com