model: add prototypes to header
authorBrian Norris <banorris@uci.edu>
Fri, 20 Apr 2012 17:47:10 +0000 (10:47 -0700)
committerBrian Norris <banorris@uci.edu>
Fri, 20 Apr 2012 17:58:04 +0000 (10:58 -0700)
I will implement these functions in the next few commits.

model.cc
model.h

index 17ff0f96708d2792a2aae2e4910d8ed27baa3d87..4307b392b3e15c6be1e837d07a9baae31aaee3e0 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -14,6 +14,8 @@ ModelChecker::ModelChecker()
        this->scheduler = new Scheduler();
 
        this->current_action = NULL;
+       this->exploring = NULL;
+       this->nextThread = THREAD_ID_T_NONE;
 
        rootNode = new TreeNode(NULL);
        currentNode = rootNode;
diff --git a/model.h b/model.h
index db1360124eb9f6da159ac0182ea247a34f25dc6a..01cf29b53cfe7928cfa88240e21975682509f758 100644 (file)
--- a/model.h
+++ b/model.h
@@ -78,6 +78,7 @@ public:
        void check_current_action(void);
        void set_backtracking(ModelAction *act);
        void print_trace(void);
+       Thread *schedule_next_thread();
 
        int add_thread(Thread *t);
        Thread *get_thread(thread_id_t tid) { return thread_map[tid]; }
@@ -87,7 +88,14 @@ public:
        int switch_to_master(ModelAction *act);
 private:
        int used_thread_id;
+
+       thread_id_t advance_backtracking_state();
+       thread_id_t get_next_replay_thread();
+
        class ModelAction *current_action;
+       Backtrack *exploring;
+       thread_id_t nextThread;
+
        action_list_t *action_trace;
        std::map<thread_id_t, class Thread *> thread_map;
        class TreeNode *rootNode, *currentNode;