summaryrefslogtreecommitdiff
path: root/pthread_barrier_wait.c
diff options
context:
space:
mode:
Diffstat (limited to 'pthread_barrier_wait.c')
-rw-r--r--pthread_barrier_wait.c20
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]));
}
/*