summaryrefslogtreecommitdiff
path: root/pthread_cond_wait.c
diff options
context:
space:
mode:
authorrpj <rpj>2004-05-17 01:38:02 +0000
committerrpj <rpj>2004-05-17 01:38:02 +0000
commit771465fed0cf50ee2dd790723245fc091699c324 (patch)
treed8c18d095a33fe7c4564bd90c5f313bb9e4057dd /pthread_cond_wait.c
parent8b14911744f58cbe3730703f3fcc41cd969fd0f3 (diff)
re-indentation, bug fixes, hooks for pre-emptive async cancelation
Diffstat (limited to 'pthread_cond_wait.c')
-rw-r--r--pthread_cond_wait.c4
1 files changed, 3 insertions, 1 deletions
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;