diff options
Diffstat (limited to 'pthread_win32_attach_detach_np.c')
-rw-r--r-- | pthread_win32_attach_detach_np.c | 7 |
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. |