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:
Mark Johnston 2024-08-28 19:25:11 +00:00
parent 8254a276ad
commit cb91dc5095

View file

@ -270,7 +270,7 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX);
__DECONST(volatile uintptr_t *, (x))))
#define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr)
#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_set_ptr ATOMIC_SAN(set_ptr)
#define atomic_set_acq_ptr ATOMIC_SAN(set_acq_ptr)