|
@@ -226,6 +226,7 @@ void intersection_before_entry(Direction origin, Direction destination)
|
|
|
temp->cv = cv_create("carcv");
|
|
|
}
|
|
|
|
|
|
+ kprintf("put something to sleep\n");
|
|
|
cv_wait(temp->cv, globlock); // sleep and reacquire lock once woken
|
|
|
goto RESTART; // now we have to make sure there's nothing else screwing us over
|
|
|
}
|
|
@@ -237,6 +238,7 @@ void intersection_before_entry(Direction origin, Direction destination)
|
|
|
}
|
|
|
|
|
|
push(new);
|
|
|
+ kprintf("added a car to the int\n");
|
|
|
lock_release(globlock);
|
|
|
}
|
|
|
|
|
@@ -257,5 +259,6 @@ void intersection_after_exit(Direction origin, Direction destination)
|
|
|
lock_acquire(globlock);
|
|
|
int position = *(dirs + origin) + *(*(compass + origin) + destination);
|
|
|
clearint(*(active + position));
|
|
|
+ kprintf("released a car from the int\n");
|
|
|
lock_release(globlock);
|
|
|
}
|