From 18a14cc9351e9c44df539ad21ce825679bc023ca Mon Sep 17 00:00:00 2001 From: Shell Date: Fri, 17 Mar 2023 15:11:38 +0800 Subject: [rt-smart] move sys_cacheflush to lwp_syscall.c (#7048) * [syscall] move sys_cacheflush to lwp_syscall.c * [syscall] improve assertion * [format] rename to rt_ctassert * [debug] modified ct assertion on mm_page.c --- include/rtdef.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/rtdef.h b/include/rtdef.h index eda6f4ba2d..a292f2bc11 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -158,6 +158,9 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_UNUSED(x) ((void)x) +/* compile time assertion */ +#define RT_CTASSERT(name, expn) typedef char _ct_assert_##name[(expn)?1:-1] + /* Compiler Related Definitions */ #if defined(__ARMCC_VERSION) /* ARM Compiler */ #define rt_section(x) __attribute__((section(x))) @@ -188,7 +191,7 @@ typedef __gnuc_va_list va_list; #define va_end(v) __builtin_va_end(v) #define va_arg(v,l) __builtin_va_arg(v,l) #endif /* RT_USING_LIBC */ -#define __RT_STRINGIFY(x...) (#x) +#define __RT_STRINGIFY(x...) #x #define RT_STRINGIFY(x...) __RT_STRINGIFY(x) #define rt_section(x) __attribute__((section(x))) #define rt_used __attribute__((used)) -- cgit v1.3.1