X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=waitobj.h;h=36d95796461fa8e73718d9de125762cb5d2c353e;hb=88d21086018b797fbd9f57867751f8f823bb2474;hp=34c174289731368c0f9233c2bf275ee4288c3ab4;hpb=6d6466bb4b471d3ff1062bb574b1f50dad0f31c9;p=c11tester.git diff --git a/waitobj.h b/waitobj.h index 34c17428..36d95796 100644 --- a/waitobj.h +++ b/waitobj.h @@ -17,7 +17,8 @@ public: void add_waiting_for(thread_id_t other, FuncNode * node, int dist); void add_waited_by(thread_id_t other); - bool remove_waiting_for(thread_id_t other, FuncNode * node); + bool remove_waiting_for_node(thread_id_t other, FuncNode * node); + void remove_waiting_for(thread_id_t other); void remove_waited_by(thread_id_t other); thrd_id_set_t * getWaitingFor() { return &waiting_for; } @@ -25,7 +26,9 @@ public: node_set_t * getTargetNodes(thread_id_t tid); int lookup_dist(thread_id_t tid, FuncNode * target); - int lookup_dist(thread_id_t other_tid); + + bool incr_counter(thread_id_t tid); + void clear_waiting_for(); void print_waiting_for(bool verbose = false); @@ -44,6 +47,10 @@ private: SnapVector thrd_dist_maps; SnapVector thrd_target_nodes; + /* Count the number of actions for threads that + * this thread is waiting for */ + SnapVector thrd_action_counters; + dist_map_t * getDistMap(thread_id_t tid); };