summaryrefslogtreecommitdiff
path: root/pthread_setcancelstate.c
diff options
context:
space:
mode:
authorrpj <rpj>2005-03-16 01:33:20 +0000
committerrpj <rpj>2005-03-16 01:33:20 +0000
commit37f6fe772e5779120d2ee372c5d51ff60b6801dc (patch)
treeb611e6b1c26e36a32e761962ab6693b02744c784 /pthread_setcancelstate.c
parent3d32060783bcaf10f38ff6eef6fcf5711bfeada4 (diff)
Diffstat (limited to 'pthread_setcancelstate.c')
-rw-r--r--pthread_setcancelstate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pthread_setcancelstate.c b/pthread_setcancelstate.c
index 002cfe5..12fdda4 100644
--- a/pthread_setcancelstate.c
+++ b/pthread_setcancelstate.c
@@ -103,8 +103,10 @@ pthread_setcancelstate (int state, int *oldstate)
/*
* Check if there is a pending asynchronous cancel
+ * only if we don't have alertable async cancel.
*/
if (state == PTHREAD_CANCEL_ENABLE
+ && (ptw32_features & PTW32_ALERTABLE_ASYNC_CANCEL) == 0
&& sp->cancelType == PTHREAD_CANCEL_ASYNCHRONOUS
&& WaitForSingleObject (sp->cancelEvent, 0) == WAIT_OBJECT_0)
{