From 05445c04e8dc0a7968330ee981aac8de2c6315cc Mon Sep 17 00:00:00 2001 From: wdfk-prog <1425075683@qq.com> Date: Fri, 13 Mar 2026 14:15:05 +0800 Subject: feat(core): Add 8-bit and 16-bit atomic operation support --- include/rttypes.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/rttypes.h') 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 + 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 */ -- cgit v1.3.1