projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model: bugfix - reset the "current_action" after it has been processed
[model-checker.git]
/
threads.cc
diff --git
a/threads.cc
b/threads.cc
index 47a211c20fe37ea25bf2536dc26cbbc520437291..917090fb71500665009e1c5d4d0e50d3de729e06 100644
(file)
--- a/
threads.cc
+++ b/
threads.cc
@@
-121,11
+121,11
@@
static int thread_system_next(void)
Thread *curr, *next;
curr = thread_current();
Thread *curr, *next;
curr = thread_current();
- model->check_current_action();
if (curr) {
if (curr) {
- if (curr->get_state() == THREAD_READY)
+ if (curr->get_state() == THREAD_READY) {
+ model->check_current_action();
model->scheduler->add_thread(curr);
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
/* Stopped while running; i.e., completed */
curr->complete();
else