9 typedef ModelList<FuncInst *> func_inst_list_mt;
13 FuncInst(ModelAction *act, FuncNode *func_node);
16 const char * get_position() const { return position; }
18 void * get_location() const { return location; }
19 void set_location(void * loc) { location = loc; }
21 action_type get_type() const { return type; }
22 memory_order get_mo() const { return order; }
23 FuncNode * get_func_node() const { return func_node; }
25 bool add_pred(FuncInst * other);
26 bool add_succ(FuncInst * other);
28 //FuncInst * search_in_collision(ModelAction *act);
29 //func_inst_list_mt * get_collisions() { return &collisions; }
31 func_inst_list_mt * get_preds() { return &predecessors; }
32 func_inst_list_mt * get_succs() { return &successors; }
35 bool is_write() const;
36 bool is_single_location() { return single_location; }
37 void not_single_location() { single_location = false; }
39 void set_execution_number(int new_number) { execution_number = new_number; }
40 int get_execution_number() { return execution_number; }
42 void set_associated_act(ModelAction * act, uint32_t marker);
43 ModelAction * get_associated_act(uint32_t marker);
49 const char * position;
51 /* Atomic operations with the same source line number may act at different
52 * memory locations, such as the next field of the head pointer in ms-queue.
53 * location only stores the memory location when this FuncInst was constructed.
57 /* NOTE: for rmw actions, func_inst and act may have different
58 * action types because of action type conversion in ModelExecution */
67 ModelAction * associated_act;
68 uint32_t action_marker;
70 /* Currently not in use. May remove this field later
72 * collisions store a list of FuncInsts with the same position
73 * but different action types. For example, CAS is broken down
74 * as three different atomic operations in cmodelint.cc */
75 // func_inst_list_mt collisions;
77 func_inst_list_mt predecessors;
78 func_inst_list_mt successors;
81 #endif /* __FUNCINST_H__ */