fix warnings
[c11tester.git] / clockvector.h
1 /** @file clockvector.h
2  *  @brief Implements a clock vector.
3  */
4
5 #ifndef __CLOCKVECTOR_H__
6 #define __CLOCKVECTOR_H__
7
8 #include "mymemory.h"
9 #include "modeltypes.h"
10 #include "classlist.h"
11
12 class ClockVector {
13 public:
14         ClockVector(ClockVector *parent = NULL, const ModelAction *act = NULL);
15         ~ClockVector();
16         bool merge(const ClockVector *cv);
17         bool minmerge(const ClockVector *cv);
18         bool synchronized_since(const ModelAction *act) const;
19
20         void print() const;
21         modelclock_t getClock(thread_id_t thread);
22
23         SNAPSHOTALLOC
24 private:
25         /** @brief Holds the actual clock data, as an array. */
26         modelclock_t *clock;
27
28         /** @brief The number of threads recorded in clock (i.e., its length).  */
29         int num_threads;
30 };
31
32 #endif  /* __CLOCKVECTOR_H__ */