4 #include "threads-model.h"
6 typedef SnapList<uint32_t> func_id_list_t;
13 void enter_function(const uint32_t func_id, thread_id_t tid);
14 void exit_function(const uint32_t func_id, thread_id_t tid);
16 uint32_t get_func_counter() { return func_counter; }
17 void incr_func_counter() { func_counter++; }
19 void add_func_atomic(ModelAction *act, thread_id_t tid);
21 HashTable<const char *, uint32_t, uintptr_t, 4> * getFuncMap() { return &func_map; }
22 ModelVector<FuncNode *> * getFuncAtomics() { return &func_atomics; }
28 uint32_t func_counter;
30 /* map function names to integer ids */
31 HashTable<const char *, uint32_t, uintptr_t, 4> func_map;
33 ModelVector<FuncNode *> func_atomics;
35 /* Work_list stores a list of function ids for each thread.
36 * Each element in work_list is intended to be used as a stack storing
37 * the functions that thread i has entered and yet to exit from
40 /* todo: move work_list to execution.cc to avoid seg fault */
41 SnapVector< func_id_list_t * > work_list;