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 /sem_destroy.c | |
parent | 8b14911744f58cbe3730703f3fcc41cd969fd0f3 (diff) |
re-indentation, bug fixes, hooks for pre-emptive async cancelation
Diffstat (limited to 'sem_destroy.c')
-rw-r--r-- | sem_destroy.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sem_destroy.c b/sem_destroy.c index bd6cb7e..733afd3 100644 --- a/sem_destroy.c +++ b/sem_destroy.c @@ -55,19 +55,19 @@ sem_destroy (sem_t * sem) * * PARAMETERS * sem - * pointer to an instance of sem_t + * pointer to an instance of sem_t * * DESCRIPTION * This function destroys an unnamed semaphore. * * RESULTS - * 0 successfully destroyed semaphore, - * -1 failed, error in errno + * 0 successfully destroyed semaphore, + * -1 failed, error in errno * ERRNO - * EINVAL 'sem' is not a valid semaphore, - * ENOSYS semaphores are not supported, - * EBUSY threads (or processes) are currently - * blocked on 'sem' + * EINVAL 'sem' is not a valid semaphore, + * ENOSYS semaphores are not supported, + * EBUSY threads (or processes) are currently + * blocked on 'sem' * * ------------------------------------------------------ */ @@ -86,19 +86,19 @@ sem_destroy (sem_t * sem) #ifdef NEED_SEM - if (! CloseHandle(s->event)) + if (!CloseHandle (s->event)) { *sem = s; result = EINVAL; } else { - DeleteCriticalSection(&s->sem_lock_cs); + DeleteCriticalSection (&s->sem_lock_cs); } #else /* NEED_SEM */ - if (! CloseHandle (s->sem)) + if (!CloseHandle (s->sem)) { *sem = s; result = EINVAL; @@ -114,7 +114,7 @@ sem_destroy (sem_t * sem) return -1; } - free(s); + free (s); return 0; |