libstdc++: Fix handling of futex wake [PR 97936]
The __platform_wait function is supposed to wait until *addr != old.
The futex syscall checks the initial value and returns EAGAIN if *addr
!= old is already true, which should cause __platform_wait to return.
Instead it loops and keeps doing a futex wait, which keeps returning
EAGAIN.
libstdc++-v3/ChangeLog:
PR libstdc++/97936
* include/bits/atomic_wait.h (__platform_wait): Return if futex
sets EAGAIN.
* testsuite/30_threads/latch/3.cc: Re-enable test.
* testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.