add hashtable
[model-checker.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 "threads.h"
9 #include "mymemory.h"
10
11 /* Forward declaration */
12 class ModelAction;
13
14 class ClockVector {
15 public:
16         ClockVector(ClockVector *parent = NULL, ModelAction *act = NULL);
17         ~ClockVector();
18         void merge(ClockVector *cv);
19         bool happens_before(ModelAction *act, thread_id_t id);
20
21         void print();
22
23         MEMALLOC
24 private:
25         int *clock;
26         int num_threads;
27 };
28
29 #endif /* __CLOCKVECTOR_H__ */