summaryrefslogtreecommitdiff
path: root/ptw32_threadDestroy.c
diff options
context:
space:
mode:
Diffstat (limited to 'ptw32_threadDestroy.c')
-rw-r--r--ptw32_threadDestroy.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c
index b88e5d9..aa95e2c 100644
--- a/ptw32_threadDestroy.c
+++ b/ptw32_threadDestroy.c
@@ -47,12 +47,6 @@ ptw32_threadDestroy (pthread_t thread)
if (tp != NULL)
{
- (void) pthread_mutex_lock (&tp->cancelLock);
- tp->state = PThreadStateLast;
- (void) pthread_mutex_unlock (&tp->cancelLock);
-
- ptw32_callUserDestroyRoutines (thread);
-
/*
* Copy thread state so that the thread can be atomically NULLed.
*/
@@ -72,17 +66,6 @@ ptw32_threadDestroy (pthread_t thread)
(void) pthread_mutex_destroy(&threadCopy.cancelLock);
(void) pthread_mutex_destroy(&threadCopy.threadLock);
-
-#if ! defined (__MINGW32__) || defined (__MSVCRT__) || defined (__DMC__)
- /*
- * See documentation for endthread vs endthreadex.
- */
- if (threadCopy.threadH != 0)
- {
- CloseHandle (threadCopy.threadH);
- }
-#endif
-
}
-
} /* ptw32_threadDestroy */
+