Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add definition of race detector annotations
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |