From 167095f6c0e99025764ea231f11b58c0b9f2685d Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 19 Oct 2000 17:57:28 +0000 Subject: * dcrt0.cc (sigthread::init): Correct overzealous ifdef. * exceptions.cc (call_handler): Avoid calling sigthread acquire lock. * sigproc.h (sigthread): Comment out lock for now. * sync.cc (muto::acquire): Add a minor optimization. --- winsup/cygwin/sync.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/sync.cc') diff --git a/winsup/cygwin/sync.cc b/winsup/cygwin/sync.cc index 86bcc0440..5aa798e69 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. */ } -- cgit v1.2.3