mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 13:44:55 +00:00
atomic: Fix the cast in the atomic_load_consume() interceptor
As in commit c7a7e997d2
, we should permit loading from a pointer to
uintptr_t.
Note that the other atomic_*_ptr() interfaces currently require casting
regardless, only those defined in atomic_common.h try to be generic.
Reported by: jrtc27
MFC after: 1 week
This commit is contained in:
parent
8254a276ad
commit
cb91dc5095
|
@ -270,7 +270,7 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX);
|
||||||
__DECONST(volatile uintptr_t *, (x))))
|
__DECONST(volatile uintptr_t *, (x))))
|
||||||
#define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr)
|
#define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr)
|
||||||
#define atomic_load_consume_ptr(x) \
|
#define atomic_load_consume_ptr(x) \
|
||||||
((void *)atomic_load_acq_ptr((volatile uintptr_t *)(x)))
|
((__typeof(*x))atomic_load_acq_ptr((volatile uintptr_t *)(x)))
|
||||||
#define atomic_readandclear_ptr ATOMIC_SAN(readandclear_ptr)
|
#define atomic_readandclear_ptr ATOMIC_SAN(readandclear_ptr)
|
||||||
#define atomic_set_ptr ATOMIC_SAN(set_ptr)
|
#define atomic_set_ptr ATOMIC_SAN(set_ptr)
|
||||||
#define atomic_set_acq_ptr ATOMIC_SAN(set_acq_ptr)
|
#define atomic_set_acq_ptr ATOMIC_SAN(set_acq_ptr)
|
||||||
|
|
Loading…
Reference in a new issue