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; }
20 void reset_location() { location = NULL; }
22 action_type get_type() const { return type; }
23 memory_order get_mo() const { return order; }
24 FuncNode * get_func_node() const { return func_node; }
26 bool add_pred(FuncInst * other);
27 bool add_succ(FuncInst * other);
29 //FuncInst * search_in_collision(ModelAction *act);
30 //func_inst_list_mt * get_collisions() { return &collisions; }
32 func_inst_list_mt * get_preds() { return &predecessors; }
33 func_inst_list_mt * get_succs() { return &successors; }
36 bool is_write() const;
37 bool is_single_location() { return single_location; }
38 void not_single_location() { single_location = false; }
44 const char * position;
46 /* Atomic operations with the same source line number may act at different
47 * memory locations, such as the next field of the head pointer in ms-queue.
48 * location only stores the memory location when this FuncInst was constructed.
57 /* Currently not in use. May remove this field later
59 * collisions store a list of FuncInsts with the same position
60 * but different action types. For example, CAS is broken down
61 * as three different atomic operations in cmodelint.cc */
62 // func_inst_list_mt collisions;
64 func_inst_list_mt predecessors;
65 func_inst_list_mt successors;
68 #endif /* __FUNCINST_H__ */