model: refactor mutex thread-blocking code
authorBrian Norris <banorris@uci.edu>
Wed, 3 Oct 2012 00:14:46 +0000 (17:14 -0700)
committerBrian Norris <banorris@uci.edu>
Wed, 3 Oct 2012 00:32:59 +0000 (17:32 -0700)
commit28a8923983a54f838c7a1667795d37c1d801877c
tree8d5118224d27d6cdacbccadd5acebbd0634cf9c5
parent1ced3dc2f0a7640ec7f724c477ea87affc697ea9
model: refactor mutex thread-blocking code

There are a few functions that are used in suboptimal ways.

* use the ModelChecker::get_thread(ModelAction *) version of overloaded
  'get_thread()' function

* the add/remove interfaces were used inconsistently previously; for
  "waking" we directly utilized Scheduler::add_thread, whereas the
  "sleeping" case used ModelChecker::remove_thread

* use the Scheduler::sleep and Scheduler::wake functions for sleep/wake
  instead of explicitly adding/removing
model.cc