The implementation of the FUTEX_WAIT option in futex(2) is subtly broken.
authorkettenis <kettenis@openbsd.org>
Fri, 21 May 2021 16:52:42 +0000 (16:52 +0000)
committerkettenis <kettenis@openbsd.org>
Fri, 21 May 2021 16:52:42 +0000 (16:52 +0000)
commit173afbac0719ddb7b5184b7ab35c6fc25d91b757
tree8725326b19d69d40835bf351af3463dc88ebf269
parent72024cb9a3b6eebcab4a5d13c7261aa982bb85d5
The implementation of the FUTEX_WAIT option in futex(2) is subtly broken.
Unfortunately libc and libpthread rely on the broken behaviour.  Adjust
the code in those libraries such that it works with both the old and the
proposed new behaviour.  The kernel changes that fix the issue will be
committed in a week or so to give those who do their own builds a chance
to update these libraries before we make the change.

ok mpi@, deraadt@
lib/libc/thread/synch.h
lib/librthread/synch.h