tarfeef101 6 jaren geleden
bovenliggende
commit
541c7d2cbe
1 gewijzigde bestanden met toevoegingen van 3 en 0 verwijderingen
  1. 3 0
      kern/synchprobs/traffic_synch.c

+ 3 - 0
kern/synchprobs/traffic_synch.c

@@ -62,6 +62,9 @@ static void activeinit(void)
 // push a car to the active array
 static void push(car * newcar)
 {
+  kprintf("first third: %d", *(dirs + newcar->origin));
+  kprintf("second third: %p", *(compass + newcar->origin));
+  kprintf("third third: %d", *(*(compass + newcar->origin) + newcar->dest));
   // dirs + origin is our offset for where to start in the array
   // compass + origin is the array we use to determine what to add to the first number
   // newcar->dest gives the direction, which we use to find the offset indicating it's additive value