diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
index 29065b5..26ddac8 100644
--- a/glib/gthread-win32.c
+++ b/glib/gthread-win32.c
@@ -860,6 +860,33 @@ g_thread_xp_SleepConditionVariableSRW (gpointer cond,
 
   g_mutex_lock (mutex);
 
+  EnterCriticalSection (&g_thread_xp_lock);
+  if (cv->first == waiter)
+    {
+      cv->first = waiter->next;
+      if (cv->first == NULL)
+          cv->last_ptr = &cv->first;
+    }
+  else
+    {
+      GThreadXpWaiter *waiter2;
+      waiter2 = cv->first;
+      while (waiter2 != NULL)
+        {
+          GThreadXpWaiter *next;
+          next = waiter2->next;
+          if (next == waiter)
+            {
+              waiter2->next = waiter->next;
+              if (waiter2->next == NULL)
+                cv->last_ptr = &waiter2->next;
+              break;
+            }
+          waiter2 = next;
+        }
+    }
+  LeaveCriticalSection (&g_thread_xp_lock);
+
   return status == WAIT_OBJECT_0;
 }
 
