diff options
author | rpj <rpj> | 2004-05-17 01:38:02 +0000 |
---|---|---|
committer | rpj <rpj> | 2004-05-17 01:38:02 +0000 |
commit | 771465fed0cf50ee2dd790723245fc091699c324 (patch) | |
tree | d8c18d095a33fe7c4564bd90c5f313bb9e4057dd /ptw32_increase_semaphore.c | |
parent | 8b14911744f58cbe3730703f3fcc41cd969fd0f3 (diff) |
re-indentation, bug fixes, hooks for pre-emptive async cancelation
Diffstat (limited to 'ptw32_increase_semaphore.c')
-rw-r--r-- | ptw32_increase_semaphore.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ptw32_increase_semaphore.c b/ptw32_increase_semaphore.c index 9eafaed..a4a8e84 100644 --- a/ptw32_increase_semaphore.c +++ b/ptw32_increase_semaphore.c @@ -48,25 +48,25 @@ #ifdef NEED_SEM INLINE BOOL -ptw32_increase_semaphore(sem_t * sem, unsigned int n) +ptw32_increase_semaphore (sem_t * sem, unsigned int n) { BOOL result; register sem_t s = *sem; - EnterCriticalSection(&s->sem_lock_cs); + EnterCriticalSection (&s->sem_lock_cs); if (s->value + n > s->value) { - s->value += n; - SetEvent(s->event); - result = PTW32_TRUE; + s->value += n; + SetEvent (s->event); + result = PTW32_TRUE; } else { - result = PTW32_FALSE; + result = PTW32_FALSE; } - LeaveCriticalSection(&s->sem_lock_cs); + LeaveCriticalSection (&s->sem_lock_cs); return result; } |