+ if (!params.maxreads)
+ return;
+ if (curr->get_node()->get_read_from_past_size() <= 1)
+ return;
+ /* Must make sure that execution is currently feasible... We could
+ * accidentally clear by rolling back */
+ if (is_infeasible())
+ return;
+ std::vector<action_list_t> *thrd_lists = get_safe_ptr_vect_action(obj_thrd_map, curr->get_location());
+ int tid = id_to_int(curr->get_tid());
+
+ /* Skip checks */
+ if ((int)thrd_lists->size() <= tid)
+ return;
+ action_list_t *list = &(*thrd_lists)[tid];
+
+ action_list_t::reverse_iterator rit = list->rbegin();
+ /* Skip past curr */
+ for (; (*rit) != curr; rit++)
+ ;
+ /* go past curr now */
+ rit++;
+
+ action_list_t::reverse_iterator ritcopy = rit;
+ /* See if we have enough reads from the same value */
+ int count = 0;
+ for (; count < params.maxreads; rit++, count++) {
+ if (rit == list->rend())