schedule: bugfix - set 'current' thread in all cases
authorBrian Norris <banorris@uci.edu>
Mon, 23 Apr 2012 22:40:42 +0000 (15:40 -0700)
committerBrian Norris <banorris@uci.edu>
Mon, 23 Apr 2012 22:54:55 +0000 (15:54 -0700)
When the scheduler was following a model-checking replay execution, it did not
set the 'current' thread properly.

schedule.cc

index 4d1cb126579584942c67e32160c8f5e33669472b..d344fb1acdcf858db73d098b7341a8dae930125f 100644 (file)
@@ -14,6 +14,7 @@ Thread *Scheduler::next_thread(void)
        Thread *t = model->schedule_next_thread();
 
        if (t != NULL) {
+               current = t;
                readyList.remove(t);
        } else if (readyList.empty()) {
                t = NULL;