summaryrefslogtreecommitdiff
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-02-04 01:42:18 +0300
committerIngo Molnar <mingo@kernel.org>2020-03-21 11:42:04 +0300
commit7ad900d35b49af5a05f595d2274c32e69e01b055 (patch)
treef14e7877c68684e9ee1c85ac30ddeeb384d66a75 /include/linux/compiler.h
parent76d6f06c36a3b5cc402eeeb709613cb211fdaa8f (diff)
downloadlinux-7ad900d35b49af5a05f595d2274c32e69e01b055.tar.xz
kcsan: Add docbook header for data_race()
Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Marco Elver <elver@google.com> Cc: Dmitry Vyukov <dvyukov@google.com>
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r--include/linux/compiler.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 8c0beb10c1dd..c1bdf37571cb 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -315,13 +315,15 @@ unsigned long read_word_at_a_time(const void *addr)
#include <linux/kcsan.h>
-/*
- * data_race(): macro to document that accesses in an expression may conflict with
- * other concurrent accesses resulting in data races, but the resulting
- * behaviour is deemed safe regardless.
+/**
+ * data_race - mark an expression as containing intentional data races
+ *
+ * This data_race() macro is useful for situations in which data races
+ * should be forgiven. One example is diagnostic code that accesses
+ * shared variables but is not a part of the core synchronization design.
*
- * This macro *does not* affect normal code generation, but is a hint to tooling
- * that data races here should be ignored.
+ * This macro *does not* affect normal code generation, but is a hint
+ * to tooling that data races here are to be ignored.
*/
#define data_race(expr) \
({ \