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; }
46 const char * position;
48 /* Atomic operations with the same source line number may act at different
49 * memory locations, such as the next field of the head pointer in ms-queue.
50 * location only stores the memory location when this FuncInst was constructed.
54 /* NOTE: for rmw actions, func_inst and act may have different
55 * action types because of action type conversion in ModelExecution */
64 /* Currently not in use. May remove this field later
66 * collisions store a list of FuncInsts with the same position
67 * but different action types. For example, CAS is broken down
68 * as three different atomic operations in cmodelint.cc */
69 // func_inst_list_mt collisions;
71 func_inst_list_mt predecessors;
72 func_inst_list_mt successors;
75 #endif /* __FUNCINST_H__ */