diff options
Diffstat (limited to 'include/rttypes.h')
| -rw-r--r-- | include/rttypes.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/rttypes.h b/include/rttypes.h index 9e21ba3170..58e5a052e8 100644 --- a/include/rttypes.h +++ b/include/rttypes.h @@ -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} |
