Browse Source

even more debugging prints

tarfeef101 6 years ago
parent
commit
b4d2c13eb2
1 changed files with 2 additions and 1 deletions
  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);
   car * new = newcar(origin, destination);
   
   
   RESTART:
   RESTART:
-  
+  kprintf("starting the for loop for entering\n");
   for (int i = 0; i < 12; ++i)
   for (int i = 0; i < 12; ++i)
   {
   {
     car * temp = *(active + i);
     car * temp = *(active + i);
     
     
     if (temp)
     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))))
       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;
         continue;