X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=schedule.cc;h=d96172e010d445a2b06eff5b392b89161126f12e;hb=5fe0eea8bf392753f69ed8193a592b299a137e9c;hp=69e3d88803bcc06d15ee2fed115330b1397662f5;hpb=3519c47202090f3c4a69de0e89aaa2617b17ff75;p=model-checker.git diff --git a/schedule.cc b/schedule.cc index 69e3d88..d96172e 100644 --- a/schedule.cc +++ b/schedule.cc @@ -32,13 +32,15 @@ void Scheduler::remove_thread(Thread *t) } /** - * Remove one Thread from the scheduler. This implementation performs FIFO. + * Remove one Thread from the scheduler. This implementation defaults to FIFO, + * if a thread is not already provided. + * + * @param t Thread to run, if chosen by an external entity (e.g., + * ModelChecker). May be NULL to indicate no external choice. * @return The next Thread to run */ -Thread * Scheduler::next_thread() +Thread * Scheduler::next_thread(Thread *t) { - Thread *t = model->schedule_next_thread(); - if (t != NULL) { current = t; readyList.remove(t);