Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /pthread_cond_init.c [eb28d5] .. [6e3ac5] Maximize Restore

  Switch to side-by-side view

--- a/pthread_cond_init.c
+++ b/pthread_cond_init.c
@@ -138,7 +138,9 @@
 DONE:
   if (0 == result)
     {
-      EnterCriticalSection (&ptw32_cond_list_lock);
+      ptw32_mcs_local_node_t node;
+
+      ptw32_mcs_lock_acquire(&ptw32_cond_list_lock, &node);
 
       cv->next = NULL;
       cv->prev = ptw32_cond_list_tail;
@@ -155,7 +157,7 @@
 	  ptw32_cond_list_head = cv;
 	}
 
-      LeaveCriticalSection (&ptw32_cond_list_lock);
+      ptw32_mcs_lock_release(&node);
     }
 
   *cond = cv;