+ /* Add action to list. */
+ if (!already_added)
+ add_action_to_lists(curr);
+
+ /* Do not split atomic actions. */
+ if (curr->is_rmwr()) {
+ nextThread = thread_current()->get_id();
+ return;
+ }
+
+ /* Is there a better interface for setting the next thread rather
+ than this field/convoluted approach? Perhaps like just returning
+ it or something? */
+
+ nextThread = get_next_replay_thread();
+
+ Node *currnode = curr->get_node();
+ Node *parnode = currnode->get_parent();
+
+ if (!parnode->backtrack_empty()||!currnode->readsfrom_empty())
+ if (!next_backtrack || *curr > *next_backtrack)
+ next_backtrack = curr;
+
+ set_backtracking(curr);