7 typedef ModelList<FuncInst *> func_inst_list_mt;
14 uint32_t get_func_id() { return func_id; }
15 const char * get_func_name() { return func_name; }
16 void set_func_id(uint32_t id) { func_id = id; }
17 void set_func_name(const char * name) { func_name = name; }
19 FuncInst * get_or_add_action(ModelAction *act);
21 HashTable<const char *, FuncInst *, uintptr_t, 4, model_malloc, model_calloc, model_free> * getFuncInstMap() { return &func_inst_map; }
22 func_inst_list_mt * get_inst_list() { return &inst_list; }
23 func_inst_list_mt * get_entry_insts() { return &entry_insts; }
24 void add_entry_inst(FuncInst * inst);
26 void store_read(ModelAction * act, uint32_t tid);
27 void print_last_read(uint32_t tid);
32 const char * func_name;
34 /* Use source line number as the key of hashtable, to check if
35 * atomic operation with this line number has been added or not
37 * To do: cds_atomic_compare_exchange contains three atomic operations
38 * that are feeded with the same source line number by llvm pass
40 HashTable<const char *, FuncInst *, uintptr_t, 4, model_malloc, model_calloc, model_free> func_inst_map;
42 /* list of all atomic actions in this function */
43 func_inst_list_mt inst_list;
45 /* possible entry atomic actions in this function */
46 func_inst_list_mt entry_insts;
48 /* Store the values read by atomic read actions per thread for each memory location */
49 HashTable<void *, ModelVector<uint64_t> *, uintptr_t, 4, model_malloc, model_calloc, model_free> loc_thrd_read_map;
50 ModelList<void *> read_locations;