[atomic]修复bsp/simulator vs2019编译下 atomic 两个volatile的问题 (#7736)

This commit is contained in:
zhkag 2023-06-30 00:05:22 +08:00 committed by GitHub
parent 0740ce0efd
commit bce92ed724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -132,7 +132,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */
#include <stdatomic.h>
typedef atomic_size_t rt_atomic_t;
#elif defined(RT_USING_HW_ATOMIC)
typedef volatile rt_base_t rt_atomic_t;
typedef rt_base_t rt_atomic_t;
#else
/* To detect std atomic */
@ -140,7 +140,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */
#include <stdatomic.h>
typedef atomic_size_t rt_atomic_t;
#else
typedef volatile rt_base_t rt_atomic_t;
typedef rt_base_t rt_atomic_t;
#endif /* __GNUC__ && !__STDC_NO_ATOMICS__ */
#endif /* RT_USING_STDC_ATOMIC */