aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/_cscan_atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/sys/_cscan_atomic.h')
-rw-r--r--sys/sys/_cscan_atomic.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/sys/_cscan_atomic.h b/sys/sys/_cscan_atomic.h
index 19c05b179940..3bd9455102b1 100644
--- a/sys/sys/_cscan_atomic.h
+++ b/sys/sys/_cscan_atomic.h
@@ -243,7 +243,10 @@ void kcsan_atomic_thread_fence_seq_cst(void);
#define atomic_subtract_ptr kcsan_atomic_subtract_ptr
#define atomic_subtract_acq_ptr kcsan_atomic_subtract_acq_ptr
#define atomic_subtract_rel_ptr kcsan_atomic_subtract_rel_ptr
-#define atomic_store_ptr kcsan_atomic_store_ptr
+#define atomic_store_ptr(x, v) ({ \
+ __typeof(*x) __value = (v); \
+ kcsan_atomic_store_ptr((volatile uintptr_t *)(x), (uintptr_t)(__value));\
+})
#define atomic_store_rel_ptr kcsan_atomic_store_rel_ptr
#define atomic_swap_ptr kcsan_atomic_swap_ptr
#define atomic_testandclear_ptr kcsan_atomic_testandclear_ptr