summaryrefslogtreecommitdiff
path: root/components/libc
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-11-10 13:44:35 -0500
committerMeco Man <[email protected]>2021-11-10 14:12:36 -0500
commit52bbd9d715ba889fb3e95b7a048f1a0f3e8d5e59 (patch)
treeb2fcdeb841e2ca593c5b0fa592b5c36b66d5a45a /components/libc
parente6ae01e3326a5feb6d11176c3407bee7c920399c (diff)
[posix] implement delay functions as RT_USING_POSIX_DELAY
Diffstat (limited to 'components/libc')
-rw-r--r--components/libc/Kconfig12
-rw-r--r--components/libc/posix/src/SConscript5
2 files changed, 10 insertions, 7 deletions
diff --git a/components/libc/Kconfig b/components/libc/Kconfig
index 4506001d42..b70e0162fb 100644
--- a/components/libc/Kconfig
+++ b/components/libc/Kconfig
@@ -38,13 +38,13 @@ config RT_LIBC_DEFAULT_TIMEZONE
default 8
config RT_USING_POSIX
- bool "Enable basic POSIX layer, open/read/write/close etc"
+ bool "Enable basic POSIX layer, open()/read()/write()/close() etc"
select RT_USING_DFS
default n
if RT_USING_POSIX
config RT_USING_POSIX_STDIO
- bool "Enable standard I/O"
+ bool "Enable standard I/O, STDOUT_FILENO/STDIN_FILENO/STDERR_FILENO"
select RT_USING_DFS
select RT_USING_DFS_DEVFS
default n
@@ -61,15 +61,15 @@ if RT_USING_POSIX
default n
config RT_USING_POSIX_DELAY
- bool "Enable delay functions"
+ bool "Enable delay APIs, sleep()/usleep()/msleep() etc"
default n
config RT_USING_POSIX_GETLINE
- bool "Enable getline()/getdelim() APIs"
+ bool "Enable getline()/getdelim()"
default n
config RT_USING_POSIX_MMAP
- bool "Enable mmap() API"
+ bool "Enable mmap()"
select RT_USING_DFS
default n
@@ -78,7 +78,7 @@ if RT_USING_POSIX
default n
config RT_USING_POSIX_AIO
- bool "Enable AIO"
+ bool "Enable AIO APIs"
default n
endif
diff --git a/components/libc/posix/src/SConscript b/components/libc/posix/src/SConscript
index 0f5d0e9911..78a2a933ed 100644
--- a/components/libc/posix/src/SConscript
+++ b/components/libc/posix/src/SConscript
@@ -2,13 +2,16 @@
from building import *
-src = ['unistd.c', 'delay.c']
+src = ['unistd.c']
cwd = GetCurrentDir()
CPPPATH = [cwd]
if GetDepend('RT_USING_POSIX_STDIO'):
src += ['libc.c']
+if GetDepend('RT_USING_POSIX_DELAY'):
+ src += ['delay.c']
+
if GetDepend('RT_USING_POSIX_POLL'):
src += ['poll.c']