read_locations()
{}
-/* Check whether FuncInst with the same type, position, and location
+/* Check whether FuncInst with the same type, position, and location
* as act has been added to func_inst_map or not. If so, return it;
* if not, add it and return it.
*
func_inst = new FuncInst(act, this);
inst->get_collisions()->push_back(func_inst);
- inst_list.push_back(func_inst); // delete?
+ inst_list.push_back(func_inst); // delete?
return func_inst;
}
return;
func_inst_list_mt::iterator it;
- for (it = entry_insts.begin(); it != entry_insts.end(); it++) {
+ for (it = entry_insts.begin();it != entry_insts.end();it++) {
if (inst == *it)
return;
}
/* Store the memory locations where atomic reads happen */
bool push_loc = true;
ModelList<void *>::iterator it;
- for (it = read_locations.begin(); it != read_locations.end(); it++) {
+ for (it = read_locations.begin();it != read_locations.end();it++) {
if (location == *it) {
push_loc = false;
break;
*/
void FuncNode::clear_read_map(uint32_t tid)
{
- ASSERT(thrd_read_map.size() > tid);
+ if (thrd_read_map.size() <= tid)
+ return;
+
thrd_read_map[tid]->reset();
}
read_map_t * read_map = thrd_read_map[tid];
ModelList<void *>::iterator it;
- for (it = read_locations.begin(); it != read_locations.end(); it++) {
+ for (it = read_locations.begin();it != read_locations.end();it++) {
if ( !read_map->contains(*it) )
break;