Skip to content

Commit

Permalink
add definition of race detector annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
John Mellor-Crummey committed Jan 3, 2018
1 parent 73cc0d4 commit fd8073a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions common/h/race-detector-annotations.h
@@ -0,0 +1,25 @@
#ifndef __race_detector_annotations_h__
#define __race_detector_annotations_h__

#include "util.h"

#ifdef __cplusplus
extern "C" {
#endif

#ifdef ENABLE_RACE_DETECTION
COMMON_EXPORT void race_detector_fake_lock_acquire(void);
COMMON_EXPORT void race_detector_fake_lock_release(void);
COMMON_EXPORT void race_detector_forget_access_history(void *loc, unsigned int nbytes);

#else
#define race_detector_fake_lock_acquire()
#define race_detector_fake_lock_release()
#define race_detector_forget_access_history(loc, nbytes)
#endif

#ifdef __cplusplus
}
#endif

#endif

0 comments on commit fd8073a

Please sign in to comment.