summaryrefslogtreecommitdiff
path: root/pthread_barrier_wait.c
diff options
context:
space:
mode:
authorrpj <rpj>2004-09-13 04:32:16 +0000
committerrpj <rpj>2004-09-13 04:32:16 +0000
commit531ca4db4794aab863a898b4d079ccd59b424b25 (patch)
tree0fb6d71aef115a8a01cd0252363f369517deed3c /pthread_barrier_wait.c
parent4b0d69122798d07ac700941d3b649f1653750ce2 (diff)
Clarify behaviour and remove some redundant code - see ChangeLogs
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]));
}
/*