Pārlūkot izejas kodu

don't have to release lock when using CVs, it does that for you

tarfeef101 6 gadi atpakaļ
vecāks
revīzija
d0233a7610
1 mainītis faili ar 1 papildinājumiem un 2 dzēšanām
  1. 1 2
      kern/synchprobs/traffic_synch.c

+ 1 - 2
kern/synchprobs/traffic_synch.c

@@ -220,8 +220,7 @@ void intersection_before_entry(Direction origin, Direction destination)
       else
       {
         new->old = 1; // make new "old", since now it has already waited once
-        lock_release(globlock);
-        
+
         // create cv for temp if it doesn't have one yet
         if(!(temp->cv))
         {