* @brief Data race detection code.
*/
-#ifndef DATARACE_H
+#ifndef __DATARACE_H__
+#define __DATARACE_H__
+
#include "config.h"
#include <stdint.h>
#include "modeltypes.h"
-#include "stl-model.h"
-
-/* Forward declaration */
-class ClockVector;
-class ModelAction;
+#include "classlist.h"
struct ShadowTable {
void * array[65536];
struct DataRace {
/* Clock and thread associated with first action. This won't change in
- response to synchronization. */
+ response to synchronization. */
thread_id_t oldthread;
modelclock_t oldclock;
bool isoldwrite;
/* Model action associated with second action. This could change as
- a result of synchronization. */
+ a result of synchronization. */
ModelAction *newaction;
/* Record whether this is a write, so we can tell the user. */
bool isnewwrite;
#define MASK16BIT 0xffff
void initRaceDetector();
-void raceCheckWrite(thread_id_t thread, void *location, ClockVector *currClock);
-void raceCheckRead(thread_id_t thread, const void *location, ClockVector *currClock);
+void raceCheckWrite(thread_id_t thread, void *location);
+void raceCheckRead(thread_id_t thread, const void *location);
bool checkDataRaces();
void assert_race(struct DataRace *race);
-
-extern SnapVector<struct DataRace *> unrealizedraces;
+bool haveUnrealizedRaces();
/**
* @brief A record of information for detecting data races
#define MAXTHREADID (THREADMASK-1)
#define MAXREADVECTOR (READMASK-1)
#define MAXWRITEVECTOR (WRITEMASK-1)
-#endif
+
+#endif /* __DATARACE_H__ */