model: set 'last action in thread' as an action's parent
[model-checker.git] / model.cc
index 8656d6b9710f600ab1b662ac47308a490c3bba3c..0a08717ba45d9c51e5873bf64d11b2e2a5b9cac6 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -211,7 +211,8 @@ void ModelChecker::check_current_action(void)
                return;
        }
 
-       curr = node_stack->explore_action(curr, NULL);
+       /* TODO: if get_last_action() is NULL, sync with parent thread */
+       curr = node_stack->explore_action(curr, get_last_action(curr->get_tid()));
        nextThread = get_next_replay_thread();
 
        currnode = curr->get_node();