summaryrefslogtreecommitdiff
path: root/pthread_win32_attach_detach_np.c
diff options
context:
space:
mode:
authorrpj <rpj>2011-03-25 09:22:50 +0000
committerrpj <rpj>2011-03-25 09:22:50 +0000
commit559e1bc4051f90d7a014bd4e4f5649e136dec412 (patch)
tree70e6f76c3b353b0b74b698a51088f5b9a38e53ab /pthread_win32_attach_detach_np.c
parent395de1c8a9a25c343a6784cfc3ecf729c48024d8 (diff)
Robust mutex streamlining
Diffstat (limited to 'pthread_win32_attach_detach_np.c')
-rw-r--r--pthread_win32_attach_detach_np.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c
index d03b55f..65e0913 100644
--- a/pthread_win32_attach_detach_np.c
+++ b/pthread_win32_attach_detach_np.c
@@ -191,7 +191,6 @@ pthread_win32_thread_detach_np ()
if (sp != NULL) // otherwise Win32 thread with no implicit POSIX handle.
{
ptw32_mcs_local_node_t stateLock;
- ptw32_mcs_local_node_t listLock;
ptw32_callUserDestroyRoutines (sp->ptHandle);
ptw32_mcs_lock_acquire (&sp->stateLock, &stateLock);
@@ -205,11 +204,10 @@ pthread_win32_thread_detach_np ()
/*
* Robust Mutexes
*/
- ptw32_mcs_lock_acquire(&sp->robustMxListLock, &listLock);
while (sp->robustMxList != NULL)
{
pthread_mutex_t mx = sp->robustMxList->mx;
- ptw32_robust_mutex_quick_remove(&mx, sp);
+ ptw32_robust_mutex_remove(&mx, sp);
(void) PTW32_INTERLOCKED_EXCHANGE(
(LPLONG)&mx->robustNode->stateInconsistent,
-1L);
@@ -220,7 +218,6 @@ pthread_win32_thread_detach_np ()
*/
SetEvent(mx->event);
}
- ptw32_mcs_lock_release(&listLock);
if (sp->detachState == PTHREAD_CREATE_DETACHED)