From 531ca4db4794aab863a898b4d079ccd59b424b25 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 13 Sep 2004 04:32:16 +0000 Subject: Clarify behaviour and remove some redundant code - see ChangeLogs --- pthread_barrier_wait.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'pthread_barrier_wait.c') 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])); } /* -- cgit v1.2.3