From a3ea0b24409b89bd08c0a2268dbae834724734df Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 20 Jun 2010 03:31:18 +0000 Subject: See ChangeLogs: preparing for new release. --- pthread_win32_attach_detach_np.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'pthread_win32_attach_detach_np.c') diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c index 5bbd925..7911fe1 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -283,7 +283,7 @@ pthread_win32_thread_detach_np () */ ptw32_thread_t * sp = (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey); - if (sp != NULL) + if (sp != NULL) // otherwise Win32 thread with no implicit POSIX handle. { ptw32_callUserDestroyRoutines (sp->ptHandle); @@ -291,16 +291,10 @@ pthread_win32_thread_detach_np () sp->state = PThreadStateLast; /* * If the thread is joinable at this point then it MUST be joined - * or detached explicitly by the application because it's - * detachState cannot be changed from this point on. + * or detached explicitly by the application. */ (void) pthread_mutex_unlock (&sp->cancelLock); - /* - * No race condition here because detachState will not be changed - * elsewhere now that thread state is PThreadStateLast (set above - * behind mutex). - */ if (sp->detachState == PTHREAD_CREATE_DETACHED) { ptw32_threadDestroy (sp->ptHandle); -- cgit v1.2.3