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 /pthread_barrier_destroy.c | |
parent | 8b14911744f58cbe3730703f3fcc41cd969fd0f3 (diff) |
re-indentation, bug fixes, hooks for pre-emptive async cancelation
Diffstat (limited to 'pthread_barrier_destroy.c')
-rw-r--r-- | pthread_barrier_destroy.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/pthread_barrier_destroy.c b/pthread_barrier_destroy.c index 5bcce8d..0c58e1b 100644 --- a/pthread_barrier_destroy.c +++ b/pthread_barrier_destroy.c @@ -39,7 +39,7 @@ int -pthread_barrier_destroy(pthread_barrier_t *barrier) +pthread_barrier_destroy (pthread_barrier_t * barrier) { int result = 0; pthread_barrier_t b; @@ -52,19 +52,16 @@ pthread_barrier_destroy(pthread_barrier_t *barrier) b = *barrier; *barrier = NULL; - if (0 == (result = sem_destroy(&(b->semBarrierBreeched[0])))) + if (0 == (result = sem_destroy (&(b->semBarrierBreeched[0])))) { - if (0 == (result = sem_destroy(&(b->semBarrierBreeched[1])))) - { - (void) free(b); - return 0; - } - (void) sem_init(&(b->semBarrierBreeched[0]), - b->pshared, - 0); + if (0 == (result = sem_destroy (&(b->semBarrierBreeched[1])))) + { + (void) free (b); + return 0; + } + (void) sem_init (&(b->semBarrierBreeched[0]), b->pshared, 0); } *barrier = b; - return(result); + return (result); } - |