mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 17:18:24 +00:00
[rtdef] rename RT_CTASSERT to RT_STATIC_ASSERT
This commit is contained in:
@@ -310,7 +310,7 @@ static void sigqueue_discard(lwp_sigqueue_t sigqueue, int signo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* assuming that (void *) is compatible to long at length */
|
/* assuming that (void *) is compatible to long at length */
|
||||||
RT_CTASSERT(lp_width_same, sizeof(void *) == sizeof(long));
|
RT_STATIC_ASSERT(lp_width_same, sizeof(void *) == sizeof(long));
|
||||||
|
|
||||||
/** translate lwp siginfo to user siginfo_t */
|
/** translate lwp siginfo to user siginfo_t */
|
||||||
rt_inline void siginfo_k2u(lwp_siginfo_t ksigi, siginfo_t *usigi)
|
rt_inline void siginfo_k2u(lwp_siginfo_t ksigi, siginfo_t *usigi)
|
||||||
|
|||||||
@@ -1378,7 +1378,7 @@ struct ksigevent
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* to protect unsafe implementation in current rt-smart toolchain */
|
/* to protect unsafe implementation in current rt-smart toolchain */
|
||||||
RT_CTASSERT(sigevent_compatible, offsetof(struct ksigevent, sigev_tid) == offsetof(struct sigevent, sigev_notify_function));
|
RT_STATIC_ASSERT(sigevent_compatible, offsetof(struct ksigevent, sigev_tid) == offsetof(struct sigevent, sigev_notify_function));
|
||||||
|
|
||||||
sysret_t sys_timer_create(clockid_t clockid, struct sigevent *restrict sevp, timer_t *restrict timerid)
|
sysret_t sys_timer_create(clockid_t clockid, struct sigevent *restrict sevp, timer_t *restrict timerid)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
#define DBG_LVL DBG_WARNING
|
#define DBG_LVL DBG_WARNING
|
||||||
#include <rtdbg.h>
|
#include <rtdbg.h>
|
||||||
|
|
||||||
RT_CTASSERT(order_huge_pg, RT_PAGE_MAX_ORDER > ARCH_PAGE_SHIFT - 2);
|
RT_STATIC_ASSERT(order_huge_pg, RT_PAGE_MAX_ORDER > ARCH_PAGE_SHIFT - 2);
|
||||||
RT_CTASSERT(size_width, sizeof(rt_size_t) == sizeof(void *));
|
RT_STATIC_ASSERT(size_width, sizeof(rt_size_t) == sizeof(void *));
|
||||||
|
|
||||||
#ifdef RT_USING_SMART
|
#ifdef RT_USING_SMART
|
||||||
#include "lwp_arch_comm.h"
|
#include "lwp_arch_comm.h"
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */
|
|||||||
#define RT_UNUSED(x) ((void)x)
|
#define RT_UNUSED(x) ((void)x)
|
||||||
|
|
||||||
/* compile time assertion */
|
/* compile time assertion */
|
||||||
#define RT_CTASSERT(name, expn) typedef char _ct_assert_##name[(expn)?1:-1]
|
#define RT_STATIC_ASSERT(name, expn) typedef char _static_assert_##name[(expn)?1:-1]
|
||||||
|
|
||||||
/* Compiler Related Definitions */
|
/* Compiler Related Definitions */
|
||||||
#if defined(__ARMCC_VERSION) /* ARM Compiler */
|
#if defined(__ARMCC_VERSION) /* ARM Compiler */
|
||||||
|
|||||||
Reference in New Issue
Block a user