datarace/clockvector: switch 'clocks' to use 'unsigned int' (modelclock_t)
[model-checker.git] / clockvector.h
index d233cdd136c46f7e00c547f9ac1d4be95d62cdee..82f1e3774608229f33f1379e9037e37fff5b87a2 100644 (file)
@@ -8,6 +8,7 @@
 #include "threads.h"
 #include "mymemory.h"
 
+typedef unsigned int modelclock_t;
 /* Forward declaration */
 class ModelAction;
 
@@ -16,13 +17,17 @@ public:
        ClockVector(ClockVector *parent = NULL, ModelAction *act = NULL);
        ~ClockVector();
        void merge(ClockVector *cv);
-       bool synchronized_since(ModelAction *act);
+       bool synchronized_since(ModelAction *act) const;
 
-       void print();
+       void print() const;
+       modelclock_t getClock(thread_id_t thread);
 
        MEMALLOC
 private:
-       int *clock;
+       /** @brief Holds the actual clock data, as an array. */
+       modelclock_t *clock;
+
+       /** @brief The number of threads recorded in clock (i.e., its length).  */
        int num_threads;
 };