X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=model.cc;h=5625f30ca8b637e362ebe49203394e52fe9d9e11;hb=37add7f58b9494dff8f16ef8eb858194d46d1b37;hp=16d5db4ab280262d1c4439de6544a413f8ba794e;hpb=c048e51dd194c09e76f6c1ec91b0e48a2a0f94d1;p=model-checker.git diff --git a/model.cc b/model.cc index 16d5db4..5625f30 100644 --- a/model.cc +++ b/model.cc @@ -350,26 +350,6 @@ Thread * ModelChecker::get_thread(const ModelAction *act) const return execution->get_thread(act); } -/** - * @brief Check if a Thread is currently enabled - * @param t The Thread to check - * @return True if the Thread is currently enabled - */ -bool ModelChecker::is_enabled(Thread *t) const -{ - return scheduler->is_enabled(t); -} - -/** - * @brief Check if a Thread is currently enabled - * @param tid The ID of the Thread to check - * @return True if the Thread is currently enabled - */ -bool ModelChecker::is_enabled(thread_id_t tid) const -{ - return scheduler->is_enabled(tid); -} - /** * Switch from a model-checker context to a user-thread context. This is the * complement of ModelChecker::switch_to_master and must be called from the @@ -458,7 +438,7 @@ void ModelChecker::run() for (unsigned int i = 0; i < get_num_threads(); i++) { Thread *th = get_thread(int_to_id(i)); ModelAction *act = th->get_pending(); - if (act && is_enabled(th) && !execution->check_action_enabled(act)) { + if (act && execution->is_enabled(th) && !execution->check_action_enabled(act)) { scheduler->sleep(th); } }