From 771465fed0cf50ee2dd790723245fc091699c324 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 17 May 2004 01:38:02 +0000 Subject: re-indentation, bug fixes, hooks for pre-emptive async cancelation --- pthread_cond_wait.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pthread_cond_wait.c') diff --git a/pthread_cond_wait.c b/pthread_cond_wait.c index 57fc978..6db2a48 100644 --- a/pthread_cond_wait.c +++ b/pthread_cond_wait.c @@ -301,7 +301,8 @@ ptw32_cond_wait_cleanup (void *args) } else if (INT_MAX / 2 == ++(cv->nWaitersGone)) { - if (sem_wait (&(cv->semBlockLock)) != 0) + /* Use the non-cancellable version of sem_wait() */ + if (ptw32_semwait (&(cv->semBlockLock)) != 0) { *resultPtr = errno; /* @@ -382,6 +383,7 @@ ptw32_cond_timedwait (pthread_cond_t * cond, cv = *cond; + /* Thread can be cancelled in sem_wait() but this is OK */ if (sem_wait (&(cv->semBlockLock)) != 0) { return errno; -- cgit v1.2.3