* sync.cc (muto::acquire): Remove unneeded brackets and fix whitespace.
This commit is contained in:
parent
c1e1d36141
commit
61496ed680
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue