diff options
| author | wdfk-prog <[email protected]> | 2026-03-13 14:15:05 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-03-16 10:27:53 +0800 |
| commit | 05445c04e8dc0a7968330ee981aac8de2c6315cc (patch) | |
| tree | 0a7bafc28579b8395e2b7a5252d7a2583637a9ea /include/rttypes.h | |
| parent | b7686b8d793527b14d3ff52a7db42a01f9dc6f69 (diff) | |
feat(core): Add 8-bit and 16-bit atomic operation support
Diffstat (limited to 'include/rttypes.h')
| -rw-r--r-- | include/rttypes.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/rttypes.h b/include/rttypes.h index cfbaec8bdb..110e39df0e 100644 --- a/include/rttypes.h +++ b/include/rttypes.h @@ -99,14 +99,22 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #endif #ifdef __cplusplus + typedef rt_uint8_t rt_atomic8_t; + typedef rt_uint16_t rt_atomic16_t; typedef rt_base_t rt_atomic_t; #else #if defined(RT_USING_STDC_ATOMIC) #include <stdatomic.h> + typedef _Atomic(rt_uint8_t) rt_atomic8_t; + typedef _Atomic(rt_uint16_t) rt_atomic16_t; typedef _Atomic(rt_base_t) rt_atomic_t; #elif defined(RT_USING_HW_ATOMIC) + typedef rt_uint8_t rt_atomic8_t; + typedef rt_uint16_t rt_atomic16_t; typedef rt_base_t rt_atomic_t; #else + typedef rt_uint8_t rt_atomic8_t; + typedef rt_uint16_t rt_atomic16_t; typedef rt_base_t rt_atomic_t; #endif /* RT_USING_STDC_ATOMIC */ #endif /* __cplusplus */ |
