summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--pthread_testcancel.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2017df6..0856aba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
* ptw32_throw.c (ptw32_throw): Remove possible reference to NULL
pointer. (At the same time made the switch block conditionally
included only if exitCode is needed - RPJ.)
+ * pthread_testcancel.c (pthread_testcancel): Remove duplicate and
+ misplaced pthread_mutex_unlock().
2008-02-21 Sebastian Gottschalk <seppig_relay at gmx dot de>
diff --git a/pthread_testcancel.c b/pthread_testcancel.c
index ad7cdb9..9686d9e 100644
--- a/pthread_testcancel.c
+++ b/pthread_testcancel.c
@@ -92,10 +92,10 @@ pthread_testcancel (void)
{
ResetEvent(sp->cancelEvent);
sp->state = PThreadStateCanceling;
- (void) pthread_mutex_unlock (&sp->cancelLock);
sp->cancelState = PTHREAD_CANCEL_DISABLE;
(void) pthread_mutex_unlock (&sp->cancelLock);
ptw32_throw (PTW32_EPS_CANCEL);
+ /* Never returns here */
}
(void) pthread_mutex_unlock (&sp->cancelLock);