Skip to content

Commit 4f58820

Browse files
committed
srcu: Add KCSAN stubs
This commit adds stubs for KCSAN's data_race(), ASSERT_EXCLUSIVE_WRITER(), and ASSERT_EXCLUSIVE_ACCESS() macros to allow code using these macros to move ahead. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 3531593 commit 4f58820

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

kernel/rcu/srcutree.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@
2929
#include "rcu.h"
3030
#include "rcu_segcblist.h"
3131

32+
#ifndef data_race
33+
#define data_race(expr) \
34+
({ \
35+
expr; \
36+
})
37+
#endif
38+
#ifndef ASSERT_EXCLUSIVE_WRITER
39+
#define ASSERT_EXCLUSIVE_WRITER(var) do { } while (0)
40+
#endif
41+
#ifndef ASSERT_EXCLUSIVE_ACCESS
42+
#define ASSERT_EXCLUSIVE_ACCESS(var) do { } while (0)
43+
#endif
44+
3245
/* Holdoff in nanoseconds for auto-expediting. */
3346
#define DEFAULT_SRCU_EXP_HOLDOFF (25 * 1000)
3447
static ulong exp_holdoff = DEFAULT_SRCU_EXP_HOLDOFF;

0 commit comments

Comments
 (0)