model: bugfix - reset the "current_action" after it has been processed
authorBrian Norris <banorris@uci.edu>
Thu, 26 Apr 2012 18:38:36 +0000 (11:38 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 26 Apr 2012 19:04:50 +0000 (12:04 -0700)
commita42f201a4e0553616e34433972b7b719e6c8f24a
treede21eb04fdd4b857df61436dfef1d383c86fc9a5
parent38de1b8a5d58d70bda97ad3b453b62d721f4f7ed
model: bugfix - reset the "current_action" after it has been processed

There are executions under which we may call ModelChecker::check_current_action()
twice in a row without an acutal ModelAction (curren_action) being set in
between. This causes the previous action to be queued twice in our trace
listing.

This can be solved 2 ways:
(1) set current_action to NULL after processing it
(2) move all calls to check_current_action() under the THREAD_READY codepath,
    so that we guarantee that some Thread pushed an Action back to the
    model-checking system

I do both.
model.cc
threads.cc