schedule: make print() const
[model-checker.git] / model.h
diff --git a/model.h b/model.h
index 86e0b1e7b05a8174a05d8a3f28dc7132432962d5..6d3827c75d32d015bf98f5ff6f345041a1631068 100644 (file)
--- a/model.h
+++ b/model.h
@@ -36,23 +36,15 @@ public:
        ModelChecker(struct model_params params);
        ~ModelChecker();
 
-       /** Stores the context for the main model-checking system thread (call
-        * once)
-        * @param ctxt The system context structure
-        */
-       void set_system_context(ucontext_t *ctxt) { system_context = ctxt; }
-
        /** @returns the context for the main model-checking system thread */
-       ucontext_t * get_system_context(void) { return system_context; }
-
-       void check_current_action(void);
+       ucontext_t * get_system_context() { return &system_context; }
 
        /** Prints an execution summary with trace information. */
        void print_summary();
 
        Thread * schedule_next_thread();
 
-       int add_thread(Thread *t);
+       void add_thread(Thread *t);
        void remove_thread(Thread *t);
        Thread * get_thread(thread_id_t tid) { return thread_map->get(id_to_int(tid)); }
 
@@ -90,6 +82,7 @@ private:
         * @param act The ModelAction created by the user-thread action
         */
        void set_current_action(ModelAction *act) { current_action = act; }
+       void check_current_action();
 
        bool take_step();
 
@@ -115,7 +108,7 @@ private:
        ModelAction *diverge;
        thread_id_t nextThread;
 
-       ucontext_t *system_context;
+       ucontext_t system_context;
        action_list_t *action_trace;
        HashTable<int, Thread *, int> *thread_map;