The current action should be added to the ModelChecker lists early within
check_current_action, so that we can have consistency throughout the function.
We only allow an isolated piece of initialization (initialize_curr_action) to
occur before this step.
ModelAction *newcurr = initialize_curr_action(curr);
ModelAction *newcurr = initialize_curr_action(curr);
+ /* Add the action to lists before any other model-checking tasks */
+ if (!second_part_of_rmw)
+ add_action_to_lists(newcurr);
+
/* Build may_read_from set for newly-created actions */
if (curr == newcurr && curr->is_read())
build_reads_from_past(curr);
/* Build may_read_from set for newly-created actions */
if (curr == newcurr && curr->is_read())
build_reads_from_past(curr);
- /* Add current action to lists before work_queue loop */
- if (!second_part_of_rmw)
- add_action_to_lists(curr);
-
work_queue_t work_queue(1, CheckCurrWorkEntry(curr));
while (!work_queue.empty()) {
work_queue_t work_queue(1, CheckCurrWorkEntry(curr));
while (!work_queue.empty()) {