[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Fix DESIGN-barrier.txt to match implementation



The implementation doesn't take the lock inside the loop.

--- nptl/DESIGN-barrier.txt~	2002-09-19 12:10:08.000000000 +0200
+++ nptl/DESIGN-barrier.txt	2002-11-03 13:56:47.000000000 +0100
@@ -33,16 +33,15 @@ pthread_barrier_wait(barrier_t *barrier)
   }

   event = barrier->curr_event;
+  lll_unlock(barrier->lock);
+
   for (;;) {
-    lll_unlock(barrier->lock);

     futex_wait(&barrier->curr_event, event)

-    lll_lock(barrier->lock);
     if (event != barrier->curr_event)
       break;
   }
-  lll_unlock(barrier->lock);

   return 0;
 }


Attachment: signature.asc
Description: This is a digitally signed message part


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]