summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShell <[email protected]>2024-04-12 06:48:54 +0800
committerGitHub <[email protected]>2024-04-11 18:48:54 -0400
commitad9c20950f7811b17fecbba82ec9419b3719fc84 (patch)
tree05644c8bd83e5b2fc4877bb97cc666175474f86f
parente50fbe8b94ffe71b62be2f8726806bf8913796cc (diff)
[include] using signed atomic types
-rw-r--r--include/rttypes.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/rttypes.h b/include/rttypes.h
index 58e5a052e8..f697abf531 100644
--- a/include/rttypes.h
+++ b/include/rttypes.h
@@ -79,16 +79,16 @@ typedef rt_ubase_t rt_dev_t; /**< Type for device */
typedef rt_base_t rt_off_t; /**< Type for offset */
#ifdef __cplusplus
-typedef rt_ubase_t rt_atomic_t;
+ typedef rt_base_t rt_atomic_t;
#else
-#if defined(RT_USING_HW_ATOMIC)
-typedef rt_ubase_t rt_atomic_t;
-#elif defined(RT_USING_STDC_ATOMIC)
-#include <stdatomic.h>
-typedef atomic_size_t rt_atomic_t;
-#else
-typedef rt_ubase_t rt_atomic_t;
-#endif /* 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_intptr_t rt_atomic_t;
+ #else
+ typedef rt_base_t rt_atomic_t;
+ #endif /* RT_USING_STDC_ATOMIC */
#endif /* __cplusplus */
/* boolean type definitions */