model: move get_current_thread() implementation out of header
[model-checker.git] / model.h
diff --git a/model.h b/model.h
index 4b9e3ff53f0082b30efd095b5618186480882d5e..8e57876dabf3950e9cd3378eb15d50085a044d73 100644 (file)
--- a/model.h
+++ b/model.h
@@ -18,6 +18,7 @@
 #include "clockvector.h"
 #include "hashtable.h"
 #include "workqueue.h"
+#include "config.h"
 
 /* Forward declaration */
 class NodeStack;
@@ -25,7 +26,7 @@ class CycleGraph;
 class Promise;
 
 /** @brief Shorthand for a list of release sequence heads */
-typedef std::vector< const ModelAction *, MyAlloc<const ModelAction *> > rel_heads_list_t;
+typedef std::vector< const ModelAction *, ModelAlloc<const ModelAction *> > rel_heads_list_t;
 
 /**
  * Model checker parameter structure. Holds run-time configuration options for
@@ -66,6 +67,9 @@ public:
 
        /** Prints an execution summary with trace information. */
        void print_summary();
+#if SUPPORT_MOD_ORDER_DUMP
+       void dumpGraph(char *filename);
+#endif
 
        void add_thread(Thread *t);
        void remove_thread(Thread *t);
@@ -74,10 +78,7 @@ public:
 
        thread_id_t get_next_id();
        int get_num_threads();
-       modelclock_t get_next_seq_num();
-
-       /** @return The currently executing Thread. */
-       Thread * get_current_thread() { return scheduler->get_current_thread(); }
+       Thread * get_current_thread();
 
        int switch_to_master(ModelAction *act);
        ClockVector * get_cv(thread_id_t tid);
@@ -110,6 +111,8 @@ private:
        int num_feasible_executions;
        bool promises_expired();
 
+       modelclock_t get_next_seq_num();
+
        /**
         * Stores the ModelAction for the current thread action.  Call this
         * immediately before switching from user- to system-context to pass
@@ -151,6 +154,7 @@ private:
        void do_complete_join(ModelAction *join);
 
        ModelAction *diverge;
+       ModelAction *earliest_diverge;
 
        ucontext_t system_context;
        action_list_t *action_trace;