8 #include "libthreads.h"
15 typedef enum action_type {
25 ModelAction(action_type_t type, memory_order order, void *loc, int value);
39 class Scheduler *scheduler;
40 Thread *system_thread;
42 void add_system_thread(Thread *t);
44 void set_current_action(ModelAction *act) { current_action = act; }
45 void check_current_action(void);
46 void print_trace(void);
48 int add_thread(Thread *t);
49 Thread *get_thread(thread_id_t tid) { return thread_map[tid]; }
51 void assign_id(Thread *t);
53 int switch_to_master(ModelAction *act);
56 class ModelAction *current_action;
57 std::list<class ModelAction *> action_trace;
58 std::map<thread_id_t, class Thread *> thread_map;
59 class TreeNode *rootNode, *currentNode;
62 extern ModelChecker *model;
64 int thread_switch_to_master(ModelAction *act);
66 #endif /* __MODEL_H__ */