Cygwin: timerfd: Fix entering critical section

Getting an abandonded mutex is just as well and must be handled.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2019-01-20 22:19:27 +01:00
parent 597285ca58
commit 693c98c5e2
1 changed files with 2 additions and 1 deletions

View File

@ -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 ()
{