diff options
author | Christopher Faylor <me@cgf.cx> | 2004-05-15 20:09:04 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-05-15 20:09:04 +0400 |
commit | 71af2ed39e0c727eb8b9df6bdc1d9dbed762ad5d (patch) | |
tree | 69921ab4064acfef57405505ae50ca752b64abbc /winsup/cygwin/sync.cc | |
parent | 982c8ecdb4c8bd31c7a145117c74199e56a2dfdc (diff) |
* cygheap.h: Remove some parameter names from declarations throughout.
(cygheap::set): Reflect changes in declaration for arguments and return value
from previous checkin.
Diffstat (limited to 'winsup/cygwin/sync.cc')
-rw-r--r-- | winsup/cygwin/sync.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/winsup/cygwin/sync.cc b/winsup/cygwin/sync.cc index bd89793fd..b3eacd9c1 100644 --- a/winsup/cygwin/sync.cc +++ b/winsup/cygwin/sync.cc @@ -125,6 +125,16 @@ muto::release () threads waiting for the lock, so trigger bruteforce. */ if (InterlockedDecrement (&waiters) >= 0) (void) SetEvent (bruteforce); /* Wake up one of the waiting threads */ + else if (*name == '!') + { + CloseHandle (bruteforce); /* If *name == '!' and there are no + other waiters, then this is the + last time this muto will ever be + used, so close the handle. */ +#ifdef DEBUGGING + bruteforce = NULL; +#endif + } } return 1; /* success. */ |