summaryrefslogtreecommitdiff
path: root/pthread_win32_attach_detach_np.c
diff options
context:
space:
mode:
authorrpj <rpj>2011-03-25 02:53:23 +0000
committerrpj <rpj>2011-03-25 02:53:23 +0000
commitc31136724ab51c9b935344c46d3eca51c8b37d55 (patch)
tree66fb6cc81599defacdc4ef1ee6fd79c97ba92db2 /pthread_win32_attach_detach_np.c
parente2bee8c46a60d2f3e6bc3dfbb4f8549963060cb0 (diff)
Terminating thread robust signaling changes
Diffstat (limited to 'pthread_win32_attach_detach_np.c')
-rw-r--r--pthread_win32_attach_detach_np.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c
index 98935fb..d03b55f 100644
--- a/pthread_win32_attach_detach_np.c
+++ b/pthread_win32_attach_detach_np.c
@@ -209,11 +209,10 @@ pthread_win32_thread_detach_np ()
while (sp->robustMxList != NULL)
{
pthread_mutex_t mx = sp->robustMxList->mx;
-#if 1
ptw32_robust_mutex_quick_remove(&mx, sp);
-#else
- ptw32_robust_mutex_quick_remove(&mx, sp);
-#endif
+ (void) PTW32_INTERLOCKED_EXCHANGE(
+ (LPLONG)&mx->robustNode->stateInconsistent,
+ -1L);
/*
* If there are no waiters then the next thread to block will
* sleep, wakeup immediately and then go back to sleep.