schedule: split Scheduler::next_thread() into separate functions
authorBrian Norris <banorris@uci.edu>
Fri, 15 Feb 2013 23:33:11 +0000 (15:33 -0800)
committerBrian Norris <banorris@uci.edu>
Fri, 15 Feb 2013 23:59:27 +0000 (15:59 -0800)
commitb3786419ac8bbc47f33038b1d6c595a70490e634
tree9e3419febd6380782fea078cc2d300de665334b1
parent0c429b461653b8e02e515819d89b7acd241996ca
schedule: split Scheduler::next_thread() into separate functions

next_thread() is basically overloaded to perform two different
functions, depending on the parameters. In one case, a caller might pass
a NULL thread, which meant that Scheduler is free to select its own next
thread. In another case, a caller will pass a non-NULL thread, which
meant that the caller is simply informing the Scheduler of the next
thread to execute (i.e., which one is "currently running").

These separate functionalities are now separate functions:

  Scheduler::select_next_thread()
  Scheduler::set_current_thread(Thread *)
model.cc
schedule.cc
schedule.h