diff options
author | Christopher Faylor <me@cgf.cx> | 2000-10-19 17:57:28 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-10-19 17:57:28 +0000 |
commit | 167095f6c0e99025764ea231f11b58c0b9f2685d (patch) | |
tree | f6a38daafbd77074054d95430ec5716eb0df8e6a /winsup/cygwin/sync.cc | |
parent | 2556e737ec044e39cd8afc6f00cd0f156b9d6ede (diff) | |
download | newlib-167095f6c0e99025764ea231f11b58c0b9f2685d.zip newlib-167095f6c0e99025764ea231f11b58c0b9f2685d.tar.gz newlib-167095f6c0e99025764ea231f11b58c0b9f2685d.tar.bz2 |
* 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.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. */ } |