https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=693c98c5e2f9d674eb28952be3e105fba7ea06ad
commit 693c98c5e2f9d674eb28952be3e105fba7ea06ad Author: Corinna Vinschen <[email protected]> Date: Sun Jan 20 22:19:27 2019 +0100 Cygwin: timerfd: Fix entering critical section Getting an abandonded mutex is just as well and must be handled. Signed-off-by: Corinna Vinschen <[email protected]> Diff: --- winsup/cygwin/timerfd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/timerfd.h b/winsup/cygwin/timerfd.h index 6c42d91..7117382 100644 --- a/winsup/cygwin/timerfd.h +++ b/winsup/cygwin/timerfd.h @@ -59,7 +59,8 @@ class timerfd_shared /* write access methods */ bool enter_cs () { - return WaitForSingleObject (_access_mtx, INFINITE) == WAIT_OBJECT_0; + return (WaitForSingleObject (_access_mtx, INFINITE) & ~WAIT_ABANDONED_0) + == WAIT_OBJECT_0; } void leave_cs () {
