From acfa74f078b23d670ad04c3a2aa9cec5fbcf5afe Mon Sep 17 00:00:00 2001 From: Shell Date: Tue, 25 Jul 2023 14:07:44 +0800 Subject: [libcpu/arm] fix race condition with ldrex,strex (#7842) Signed-off-by: Shell --- include/rtdef.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/rtdef.h') diff --git a/include/rtdef.h b/include/rtdef.h index c0f1cb1f24..f0e975d725 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -128,11 +128,11 @@ typedef rt_ubase_t rt_dev_t; /**< Type for device */ typedef rt_base_t rt_off_t; /**< Type for offset */ #if !defined(__cplusplus) -#if defined(RT_USING_STDC_ATOMIC) +#if defined(RT_USING_HW_ATOMIC) + typedef rt_base_t rt_atomic_t; +#elif defined(RT_USING_STDC_ATOMIC) #include typedef atomic_size_t rt_atomic_t; -#elif defined(RT_USING_HW_ATOMIC) - typedef rt_base_t rt_atomic_t; #else /* To detect std atomic */ -- cgit v1.3.1