Pārlūkot izejas kodu

even more debugging prints

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

+ 2 - 1
kern/synchprobs/traffic_synch.c

@@ -207,13 +207,14 @@ void intersection_before_entry(Direction origin, Direction destination)
   car * new = newcar(origin, destination);
   
   RESTART:
-  
+  kprintf("starting the for loop for entering\n");
   for (int i = 0; i < 12; ++i)
   {
     car * temp = *(active + i);
     
     if (temp)
     {
+      kprintf("temp at %d was not null\n", i);
       if ((temp->origin == new->origin && temp->dest != new->dest) || (temp->origin == new->dest && temp->dest == new->origin) || (temp->dest != new->dest && (rightturn(new) || rightturn(temp))))
       {
         continue;