From: Brian Norris <banorris@uci.edu>
Date: Mon, 23 Apr 2012 22:40:42 +0000 (-0700)
Subject: schedule: bugfix - set 'current' thread in all cases
X-Git-Tag: pldi2013~522
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6357baf85edec072a52c7ea18e9fdb087765f9cb;p=model-checker.git

schedule: bugfix - set 'current' thread in all cases

When the scheduler was following a model-checking replay execution, it did not
set the 'current' thread properly.
---

diff --git a/schedule.cc b/schedule.cc
index 4d1cb12..d344fb1 100644
--- a/schedule.cc
+++ b/schedule.cc
@@ -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;