diff options
| author | Shell <[email protected]> | 2023-03-17 15:11:38 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-17 15:11:38 +0800 |
| commit | 18a14cc9351e9c44df539ad21ce825679bc023ca (patch) | |
| tree | ee4ba510ece3819a9ceb14ed30b9b4a4e5a777e2 /include | |
| parent | dfddd79b2453ab13d12b69c7db14e2f685175af7 (diff) | |
[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
Diffstat (limited to 'include')
| -rw-r--r-- | include/rtdef.h | 5 |
1 files changed, 4 insertions, 1 deletions
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)) |
