break;
}
+ /* 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()) {
}
}
- /* Add action to list. */
- if (!second_part_of_rmw)
- add_action_to_lists(curr);
-
check_curr_backtracking(curr);
set_backtracking(curr);
for (rit = list->rbegin(); rit != list->rend(); rit++) {
ModelAction *act = *rit;
- /* Include at most one act per-thread that "happens before" curr */
- if (act->happens_before(curr)) {
+ /*
+ * Include at most one act per-thread that "happens
+ * before" curr. Don't consider reflexively.
+ */
+ if (act->happens_before(curr) && act != curr) {
if (act->is_write()) {
if (rf != act && act != curr) {
mo_graph->addEdge(act, rf);
for (rit = list->rbegin(); rit != list->rend(); rit++) {
ModelAction *act = *rit;
- /* Include at most one act per-thread that "happens before" curr */
- if (act->happens_before(curr)) {
+ /*
+ * Include at most one act per-thread that "happens
+ * before" curr. Only consider reflexively if curr is
+ * RMW.
+ */
+ if (act->happens_before(curr) && (act != curr || curr->is_rmw())) {
/*
* Note: if act is RMW, just add edge:
* act --mo--> curr