X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=history.h;h=2a77e251f8786709d7731318075047803e31d1fe;hb=0e96d6b49ca2c1f81b45e0b25fc4607304bbd6f1;hp=2edf12a8c790d95f4ef56b18812220861cec4f7b;hpb=6898da1b7c46ddf3427ea0127dc68f8cc6016511;p=c11tester.git diff --git a/history.h b/history.h index 2edf12a8..2a77e251 100644 --- a/history.h +++ b/history.h @@ -7,8 +7,6 @@ #include "hashset.h" #include "threads-model.h" -typedef HashSet write_set_t; - class ModelHistory { public: ModelHistory(); @@ -28,10 +26,13 @@ public: ModelVector * getFuncNodes() { return &func_nodes; } FuncNode * get_func_node(uint32_t func_id); - uint64_t query_last_read(void * location, thread_id_t tid); +// uint64_t query_last_read(void * location, thread_id_t tid); void add_to_write_history(void * location, uint64_t write_val); + HashTable * getWriteHistory() { return &write_history; } + void add_to_loc_func_nodes_map(void * location, FuncNode * node); + void set_new_exec_flag(); void print_write(); void print_func_node(); @@ -39,15 +40,18 @@ public: private: uint32_t func_counter; - /* map function names to integer ids */ + /* Map function names to integer ids */ HashTable func_map; - /* map integer ids to function names */ + + /* Map integer ids to function names */ ModelVector func_map_rev; ModelVector func_nodes; - HashTable write_history; - HashSet write_locations; + HashTable write_history; + + /* Map a location to FuncNodes that may read from it */ + HashTable *, uintptr_t, 4> loc_func_nodes_map; }; #endif /* __HISTORY_H__ */