c4aabeb162829cf4883c1c546e2df0651fbfe5eb
[c11tester.git] / clockvector.h
1 #ifndef __CLOCKVECTOR_H__
2 #define __CLOCKVECTOR_H__
3
4 #include "threads.h"
5 #include "mymemory.h"
6
7 /* Forward declaration */
8 class ModelAction;
9
10 class ClockVector {
11 public:
12         ClockVector(ClockVector *parent = NULL, ModelAction *act = NULL);
13         ~ClockVector();
14         void merge(ClockVector *cv);
15         bool happens_before(ModelAction *act, thread_id_t id);
16
17         MEMALLOC
18 private:
19         int *clock;
20         int num_threads;
21 };
22
23 #endif /* __CLOCKVECTOR_H__ */