X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=clockvector.h;h=962e9ec4844995c811638030d5a7c11a983ea36e;hp=d233cdd136c46f7e00c547f9ac1d4be95d62cdee;hb=0e96d6b49ca2c1f81b45e0b25fc4607304bbd6f1;hpb=e8bc4a0715ce1c86f3ff7d24179e1164bf3ee61b diff --git a/clockvector.h b/clockvector.h index d233cdd1..962e9ec4 100644 --- a/clockvector.h +++ b/clockvector.h @@ -5,25 +5,27 @@ #ifndef __CLOCKVECTOR_H__ #define __CLOCKVECTOR_H__ -#include "threads.h" #include "mymemory.h" - -/* Forward declaration */ -class ModelAction; +#include "modeltypes.h" +#include "classlist.h" class ClockVector { public: - ClockVector(ClockVector *parent = NULL, ModelAction *act = NULL); + ClockVector(ClockVector *parent = NULL, const ModelAction *act = NULL); ~ClockVector(); - void merge(ClockVector *cv); - bool synchronized_since(ModelAction *act); + bool merge(const ClockVector *cv); + bool synchronized_since(const ModelAction *act) const; - void print(); + void print() const; + modelclock_t getClock(thread_id_t thread); - MEMALLOC + SNAPSHOTALLOC 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; }; -#endif /* __CLOCKVECTOR_H__ */ +#endif /* __CLOCKVECTOR_H__ */