diff options
Diffstat (limited to 'winsup/cygwin/sync.cc')
-rw-r--r-- | winsup/cygwin/sync.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/sync.cc b/winsup/cygwin/sync.cc index 86bcc04..5aa798e 100644 --- a/winsup/cygwin/sync.cc +++ b/winsup/cygwin/sync.cc @@ -87,7 +87,7 @@ muto::acquire (DWORD ms) switch (WaitForSingleObject (bruteforce, ms)) { case WAIT_OBJECT_0: - was_waiting = 0; + goto gotit; break; default: InterlockedDecrement (&waiters); @@ -96,6 +96,7 @@ muto::acquire (DWORD ms) } } +gotit: tid = this_tid; /* register this thread. */ return ++visits; /* Increment visit count. */ } |