8 #include "libthreads.h"
10 #include "threads_internal.h"
14 typedef enum action_type {
24 ModelAction(action_type_t type, memory_order order, void *loc, int value);
38 class Scheduler *scheduler;
39 Thread *system_thread;
41 void add_system_thread(Thread *t);
43 void set_current_action(ModelAction *act) { current_action = act; }
44 void check_current_action(void);
45 void print_trace(void);
47 int add_thread(Thread *t);
48 Thread *get_thread(thread_id_t tid) { return thread_map[tid]; }
50 void assign_id(Thread *t);
53 class ModelAction *current_action;
54 std::list<class ModelAction *> action_trace;
55 std::map<thread_id_t, class Thread *> thread_map;
58 extern ModelChecker *model;
60 int thread_switch_to_master(ModelAction *act);
62 #endif /* __MODEL_H__ */