clock: add modelclock_t typedef, use 'unsigned int'
[c11tester.git] / clockvector.h
index 7f32b7e6cbfba459ba97420a1624c02fd010b6be..f56d8d5089b28a86b368214b9b68ae5cf1feed59 100644 (file)
@@ -8,6 +8,7 @@
 #include "threads.h"
 #include "mymemory.h"
 
+typedef unsigned int modelclock_t;
 /* Forward declaration */
 class ModelAction;
 
@@ -16,14 +17,15 @@ 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;
+       int getClock(thread_id_t thread);
 
        MEMALLOC
 private:
        /** @brief Holds the actual clock data, as an array. */
-       int *clock;
+       modelclock_t *clock;
 
        /** @brief The number of threads recorded in clock (i.e., its length).  */
        int num_threads;