projects
/
cdsspec-compiler.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
demote 'system_thread' to just 'system_context'
[cdsspec-compiler.git]
/
model.h
diff --git
a/model.h
b/model.h
index 8cfd66f7e3d9dc896e9531fe884e6f74d9ea52a3..ad8760a28576aafecc17d05d9cb01b92e7df259d 100644
(file)
--- a/
model.h
+++ b/
model.h
@@
-4,6
+4,7
@@
#include <list>
#include <map>
#include <cstddef>
#include <list>
#include <map>
#include <cstddef>
+#include <ucontext.h>
#include "schedule.h"
#include "libthreads.h"
#include "schedule.h"
#include "libthreads.h"
@@
-69,13
+70,13
@@
public:
ModelChecker();
~ModelChecker();
class Scheduler *scheduler;
ModelChecker();
~ModelChecker();
class Scheduler *scheduler;
- Thread *system_thread;
- void add_system_thread(Thread *t);
+ void set_system_context(ucontext_t *ctxt) { system_context = ctxt; }
+ ucontext_t * get_system_context(void) { return system_context; }
void set_current_action(ModelAction *act) { current_action = act; }
void check_current_action(void);
void set_current_action(ModelAction *act) { current_action = act; }
void check_current_action(void);
- void print_
trace
(void);
+ void print_
summary
(void);
Thread * schedule_next_thread();
int add_thread(Thread *t);
Thread * schedule_next_thread();
int add_thread(Thread *t);
@@
-102,6
+103,7
@@
private:
Backtrack *exploring;
thread_id_t nextThread;
Backtrack *exploring;
thread_id_t nextThread;
+ ucontext_t *system_context;
action_list_t *action_trace;
std::map<thread_id_t, class Thread *> thread_map;
class TreeNode *rootNode, *currentNode;
action_list_t *action_trace;
std::map<thread_id_t, class Thread *> thread_map;
class TreeNode *rootNode, *currentNode;
@@
-110,6
+112,4
@@
private:
extern ModelChecker *model;
extern ModelChecker *model;
-int thread_switch_to_master(ModelAction *act);
-
#endif /* __MODEL_H__ */
#endif /* __MODEL_H__ */