From ffe7d60454ea459a73c7ea3c461cc7158bd4d85c Mon Sep 17 00:00:00 2001 From: bernard Date: Thu, 28 Jan 2021 13:37:51 +0800 Subject: [PATCH] [libc] Split time clock from pthreads --- components/libc/Kconfig | 4 ++++ components/libc/time/SConscript | 5 +---- components/lwp/Kconfig | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/libc/Kconfig b/components/libc/Kconfig index eac0fa1d59..86e42b53a1 100644 --- a/components/libc/Kconfig +++ b/components/libc/Kconfig @@ -52,6 +52,10 @@ if RT_USING_LIBC && RT_USING_DFS config RT_USING_POSIX_AIO bool "Enable AIO" default n + + config RT_USING_POSIX_CLOCKTIME + bool "Enable POSIX clock_time APIs" + default n endif endif diff --git a/components/libc/time/SConscript b/components/libc/time/SConscript index a3b74c6158..7548076ab2 100644 --- a/components/libc/time/SConscript +++ b/components/libc/time/SConscript @@ -6,10 +6,7 @@ cwd = GetCurrentDir() src = Glob('*.c') + Glob('*.cpp') CPPPATH = [cwd] -#group = DefineGroup('pthreads', src, -# depend = ['RT_USING_PTHREADS'], CPPPATH = CPPPATH) - group = DefineGroup('pthreads', src, - depend = [''], CPPPATH = CPPPATH) + depend = ['RT_USING_POSIX_CLOCKTIME'], CPPPATH = CPPPATH) Return('group') diff --git a/components/lwp/Kconfig b/components/lwp/Kconfig index 1532a2202e..47713245c9 100644 --- a/components/lwp/Kconfig +++ b/components/lwp/Kconfig @@ -2,6 +2,7 @@ config RT_USING_LWP bool "Using light-weight process" select RT_USING_DFS select RT_USING_LIBC + select RT_USING_POSIX_CLOCKTIME depends on ARCH_ARM_CORTEX_M || ARCH_ARM_ARM9 || ARCH_ARM_CORTEX_A default n help -- Gitee