[libcpu/arm] fix race condition with ldrex,strex (#7842)

Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
Shell
2023-07-25 14:07:44 +08:00
committed by GitHub
parent 0a6aaf12ad
commit acfa74f078
6 changed files with 23 additions and 15 deletions
+3 -3
View File
@@ -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 <stdatomic.h>
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 */