Parcourir la source

need to have the lock to broadcast

tarfeef101 il y a 6 ans
Parent
commit
a0f263472b
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      kern/synchprobs/traffic_synch.c

+ 2 - 0
kern/synchprobs/traffic_synch.c

@@ -114,7 +114,9 @@ static void clearint(car * done)
   
   if (temp->cv) // if this car was blocking something
   {
+    lock_acquire(globlock);
     cv_broadcast(temp->cv, globlock); // wake all/inform them you're all good
+    lock_release(globlock);
     kfree(temp->cv);
   }