add a data structure to store the values read by last read actions of each thread...
[c11tester.git] / history.cc
index fc71b9f2136d5815e2a2fdedfeec721ba31143bf..d3e36c6a37b7aaac6dd1ed02c98278b1b70020d6 100644 (file)
@@ -108,12 +108,16 @@ void ModelHistory::process_action(ModelAction *act, thread_id_t tid)
 
        /* add corresponding FuncInst to func_node and curr_inst_list*/
        FuncInst * inst = func_node->get_or_add_action(act);
-       if (inst != NULL) {
-               func_inst_list_t * curr_inst_list = func_inst_lists->back();
 
-               ASSERT(curr_inst_list != NULL);
-               curr_inst_list->push_back(inst);
-       }
+       if (inst == NULL)
+               return;
+
+       if (inst->is_read())
+               func_node->store_read(act, tid);
+
+       func_inst_list_t * curr_inst_list = func_inst_lists->back();
+       ASSERT(curr_inst_list != NULL);
+       curr_inst_list->push_back(inst);
 }
 
 /* Link FuncInsts in a list - add one FuncInst to another's predecessors and successors */