X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=threads.cc;h=917090fb71500665009e1c5d4d0e50d3de729e06;hb=a42f201a4e0553616e34433972b7b719e6c8f24a;hp=47a211c20fe37ea25bf2536dc26cbbc520437291;hpb=38de1b8a5d58d70bda97ad3b453b62d721f4f7ed;p=model-checker.git diff --git a/threads.cc b/threads.cc index 47a211c..917090f 100644 --- a/threads.cc +++ b/threads.cc @@ -121,11 +121,11 @@ static int thread_system_next(void) Thread *curr, *next; curr = thread_current(); - model->check_current_action(); if (curr) { - if (curr->get_state() == THREAD_READY) + if (curr->get_state() == THREAD_READY) { + model->check_current_action(); model->scheduler->add_thread(curr); - else if (curr->get_state() == THREAD_RUNNING) + } else if (curr->get_state() == THREAD_RUNNING) /* Stopped while running; i.e., completed */ curr->complete(); else