Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-10-19 21:57:28 +0400
committerChristopher Faylor <me@cgf.cx>2000-10-19 21:57:28 +0400
commit167095f6c0e99025764ea231f11b58c0b9f2685d (patch)
treef6a38daafbd77074054d95430ec5716eb0df8e6a /winsup/cygwin/sync.cc
parent2556e737ec044e39cd8afc6f00cd0f156b9d6ede (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/sync.cc')
-rw-r--r--winsup/cygwin/sync.cc3
1 files changed, 2 insertions, 1 deletions
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. */
}