diff options
author | Christopher Faylor <me@cgf.cx> | 2005-06-05 04:07:46 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-06-05 04:07:46 +0000 |
commit | 61496ed68038c4baa13937488b8c141501b0c0c4 (patch) | |
tree | 8ab67d1cadc29044ef1a54a5392b7cfc47b6332b /winsup/cygwin | |
parent | c1e1d36141fbb984731c6529b3d7faa7b9f37677 (diff) | |
download | newlib-61496ed68038c4baa13937488b8c141501b0c0c4.zip newlib-61496ed68038c4baa13937488b8c141501b0c0c4.tar.gz newlib-61496ed68038c4baa13937488b8c141501b0c0c4.tar.bz2 |
* sync.cc (muto::acquire): Remove unneeded brackets and fix whitespace.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/sync.cc | 18 |
2 files changed, 12 insertions, 10 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 8f18ba6..8991b64 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2005-06-05 Christopher Faylor <cgf@timesys.com> + + * sync.cc (muto::acquire): Remove unneeded brackets and fix whitespace. + 2005-06-04 Christopher Faylor <cgf@timesys.com> * malloc.cc: Update to Doug Lea's malloc v2.8.0. diff --git a/winsup/cygwin/sync.cc b/winsup/cygwin/sync.cc index 68539a2..797deed 100644 --- a/winsup/cygwin/sync.cc +++ b/winsup/cygwin/sync.cc @@ -94,16 +94,14 @@ muto::acquire (DWORD ms) LONG was_waiting = ms ? InterlockedIncrement (&waiters) : 0; while (was_waiting || InterlockedExchange (&sync, 1) != 0) - { - switch (WaitForSingleObject (bruteforce, ms)) - { - case WAIT_OBJECT_0: - was_waiting = 0; - break; - default: - return 0; /* failed. */ - } - } + switch (WaitForSingleObject (bruteforce, ms)) + { + case WAIT_OBJECT_0: + was_waiting = 0; + break; + default: + return 0; /* failed. */ + } /* Have to do it this way to avoid a race */ if (!ms) |