X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=model.cc;h=09e6b9da3150ddc88de4cc4b8ce363725cc493f3;hb=e8e32b7efa96a0b36c1475b58368d002408a7ea7;hp=f67b552dcd74ce3db332c2b157cc2515d600072f;hpb=11270ed797bd19f432589cdc7b01688ef924dd34;p=model-checker.git diff --git a/model.cc b/model.cc index f67b552..09e6b9d 100644 --- a/model.cc +++ b/model.cc @@ -218,7 +218,8 @@ void ModelChecker::execute_sleep_set() { for(unsigned int i=0;iget_enabled(thr) == THREAD_SLEEP_SET ) { + if ( scheduler->get_enabled(thr) == THREAD_SLEEP_SET && + thr->get_pending() == NULL ) { thr->set_state(THREAD_RUNNING); scheduler->next_thread(thr); Thread::swap(&system_context, thr); @@ -971,7 +972,7 @@ bool ModelChecker::promises_expired() { /** @return whether the current partial trace must be a prefix of a * feasible trace. */ bool ModelChecker::isfeasibleprefix() { - return promises->size() == 0 && pending_rel_seqs->size() == 0; + return promises->size() == 0 && pending_rel_seqs->size() == 0 && isfeasible(); } /** @return whether the current partial trace is feasible. */