diff options
| author | Shell <[email protected]> | 2023-07-25 14:07:44 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-25 14:07:44 +0800 |
| commit | acfa74f078b23d670ad04c3a2aa9cec5fbcf5afe (patch) | |
| tree | 590ae17b763a050d32bd326da2dc6ce7155bcde0 /include/rtdef.h | |
| parent | 0a6aaf12ad6801d6bd5caca82edcaca9977f5ff6 (diff) | |
[libcpu/arm] fix race condition with ldrex,strex (#7842)
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'include/rtdef.h')
| -rw-r--r-- | include/rtdef.h | 6 |
1 files changed, 3 insertions, 3 deletions
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 <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 */ |
