mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-05 15:15:29 +00:00
sync smart & dfs (#8672)
Signed-off-by: xqyjlj <xqyjlj@126.com> Signed-off-by: Shell <smokewood@qq.com> Co-authored-by: xqyjlj <xqyjlj@126.com>
This commit is contained in:
@@ -79,15 +79,15 @@ typedef rt_ubase_t rt_dev_t; /**< Type for device */
|
||||
typedef rt_base_t rt_off_t; /**< Type for offset */
|
||||
|
||||
#ifdef __cplusplus
|
||||
typedef rt_base_t rt_atomic_t;
|
||||
typedef rt_ubase_t rt_atomic_t;
|
||||
#else
|
||||
#if defined(RT_USING_HW_ATOMIC)
|
||||
typedef rt_base_t rt_atomic_t;
|
||||
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_base_t rt_atomic_t;
|
||||
typedef rt_ubase_t rt_atomic_t;
|
||||
#endif /* RT_USING_STDC_ATOMIC */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -215,6 +215,9 @@ struct rt_spinlock
|
||||
|
||||
struct rt_spinlock
|
||||
{
|
||||
#ifdef RT_USING_DEBUG
|
||||
rt_uint32_t critical_level;
|
||||
#endif /* RT_USING_DEBUG */
|
||||
rt_ubase_t lock;
|
||||
};
|
||||
#define RT_SPINLOCK_INIT {0}
|
||||
|
||||
Reference in New Issue
Block a user