diff options
Diffstat (limited to 'winsup/cygwin/thread.h')
-rw-r--r-- | winsup/cygwin/thread.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h index e0535033b..8bd8b2557 100644 --- a/winsup/cygwin/thread.h +++ b/winsup/cygwin/thread.h @@ -143,9 +143,7 @@ List_remove (fast_mutex &mx, list_node *&head, list_node const *node) mx.lock (); if (head) { - if (head == node) - head = head->next; - else + if (InterlockedCompareExchangePointer (&head, node->next, node) != node) { list_node *cur = head; |