diff options
author | rpj <rpj> | 2004-09-13 04:32:16 +0000 |
---|---|---|
committer | rpj <rpj> | 2004-09-13 04:32:16 +0000 |
commit | 531ca4db4794aab863a898b4d079ccd59b424b25 (patch) | |
tree | 0fb6d71aef115a8a01cd0252363f369517deed3c /pthread_barrier_wait.c | |
parent | 4b0d69122798d07ac700941d3b649f1653750ce2 (diff) |
Clarify behaviour and remove some redundant code - see ChangeLogs
Diffstat (limited to 'pthread_barrier_wait.c')
-rw-r--r-- | pthread_barrier_wait.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/pthread_barrier_wait.c b/pthread_barrier_wait.c index b067d66..200a02d 100644 --- a/pthread_barrier_wait.c +++ b/pthread_barrier_wait.c @@ -73,26 +73,10 @@ pthread_barrier_wait (pthread_barrier_t * barrier) } else { - BOOL switchCancelState; - int oldCancelState; - pthread_t self = pthread_self (); - /* - * This routine is not a cancelation point, so temporarily - * prevent sem_wait() from being one. - * PTHREAD_CANCEL_ASYNCHRONOUS threads can still be canceled. + * Use the non-cancelable version of sem_wait(). */ - switchCancelState = (self->cancelType == PTHREAD_CANCEL_DEFERRED && - 0 == - pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, - &oldCancelState)); - - result = sem_wait (&(b->semBarrierBreeched[step])); - - if (switchCancelState) - { - (void) pthread_setcancelstate (oldCancelState, NULL); - } + result = ptw32_semwait (&(b->semBarrierBreeched[step])); } /* |