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

  Switch to side-by-side view

--- a/pthread_join.c
+++ b/pthread_join.c
@@ -85,8 +85,9 @@
   int result;
   pthread_t self;
   ptw32_thread_t * tp = (ptw32_thread_t *) thread.p;
+  ptw32_mcs_local_node_t node;
 
-  EnterCriticalSection (&ptw32_thread_reuse_lock);
+  ptw32_mcs_lock_acquire(&ptw32_thread_reuse_lock, &node);
 
   if (NULL == tp
       || thread.x != tp->ptHandle.x)
@@ -102,7 +103,7 @@
       result = 0;
     }
 
-  LeaveCriticalSection (&ptw32_thread_reuse_lock);
+  ptw32_mcs_lock_release(&node);
 
   if (result == 0)
     {