X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=model.cc;h=d9671a30b7b31bac2b182135edf8c7f26bd1e247;hb=7bba6b355f7b2250aed59de4b9d20f36c89a3eb4;hp=090743a49ff0ce6da1a1627acdd1367ebdc5c0ac;hpb=8899359d333648c680e9a1aecf34b45a1eb6a201;p=c11tester.git diff --git a/model.cc b/model.cc index 090743a4..d9671a30 100644 --- a/model.cc +++ b/model.cc @@ -346,7 +346,6 @@ uint64_t ModelChecker::switch_to_master(ModelAction *act) void ModelChecker::startRunExecution(Thread *old) { - if (params.traceminsize != 0 && execution->get_curr_seq_num() > checkfree) { checkfree += params.checkthreshold; @@ -390,12 +389,12 @@ Thread* ModelChecker::getNextThread() if (act && execution->is_enabled(thr) && !execution->check_action_enabled(act)) { scheduler->sleep(thr); } - - chooseThread(act, thr); + chooseThread(act, thr); } return nextThread; } +/* Swap back to system_context and terminate this execution */ void ModelChecker::finishRunExecution(Thread *old) { scheduler->set_current_thread(NULL); @@ -515,9 +514,9 @@ void ModelChecker::handleChosenThread(Thread *old) chosen_thread->set_pending(NULL); chosen_thread = NULL; // Allow this thread to stash the next pending action - if (should_terminate_execution()) - finishRunExecution(th); - else +// if (should_terminate_execution()) +// finishRunExecution(th); +// else startRunExecution(th); } else { /* Consume the next action for a Thread */ @@ -566,8 +565,6 @@ void ModelChecker::run() if (break_execution) break; - thread_chosen = false; - curr_thread_num = 1; startRunExecution(NULL); } while (!should_terminate_execution());