public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: timerfd: Fix entering critical section
@ 2019-01-20 21:48 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2019-01-20 21:48 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=693c98c5e2f9d674eb28952be3e105fba7ea06ad

commit 693c98c5e2f9d674eb28952be3e105fba7ea06ad
Author: Corinna Vinschen <corinna@vinschen.de>
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 <corinna@vinschen.de>

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-20 21:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-20 21:48 [newlib-cygwin] Cygwin: timerfd: Fix entering critical section Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).