From 111a5b88cb2f9ecc87fb89df351c5045b620cb54 Mon Sep 17 00:00:00 2001 From: zhkag Date: Tue, 28 Feb 2023 09:36:03 +0800 Subject: [PATCH] smart select POSIX timer clock --- components/lwp/lwp_syscall.c | 7 +++++++ src/Kconfig | 2 ++ 2 files changed, 9 insertions(+) diff --git a/components/lwp/lwp_syscall.c b/components/lwp/lwp_syscall.c index 6b12d929fe..6995e7dc9d 100644 --- a/components/lwp/lwp_syscall.c +++ b/components/lwp/lwp_syscall.c @@ -78,6 +78,13 @@ #define GRND_RANDOM 0x0002 #endif /*GRND_RANDOM */ +#ifndef RT_USING_POSIX_TIMER +#error "No definition RT_USING_POSIX_TIMER" +#endif +#ifndef RT_USING_POSIX_CLOCK +#error "No definition RT_USING_POSIX_CLOCK" +#endif + #define SET_ERRNO(no) rt_set_errno(-(no)) #define GET_ERRNO() ((rt_get_errno() > 0) ? (-rt_get_errno()) : rt_get_errno()) struct musl_sockaddr diff --git a/src/Kconfig b/src/Kconfig index 2a9771fd11..1be8222c81 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -30,6 +30,8 @@ config RT_USING_SMART select RT_USING_ZERO select RT_USING_RANDOM select RT_USING_RTC + select RT_USING_POSIX_TIMER + select RT_USING_POSIX_CLOCK depends on ARCH_ARM_CORTEX_M || ARCH_ARM_ARM9 || ARCH_ARM_CORTEX_A || ARCH_ARMV8 || ARCH_RISCV64 help RT-Thread Smart is a microkernel based operating system on RT-Thread.