From b61cc91d14a392de17fa1c5250a842b02b6b7e2c Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Tue, 30 Nov 2021 14:50:10 -0500 Subject: [PATCH] =?UTF-8?q?[posix]=20=E5=B0=86posix=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E5=88=92=E5=88=86=E4=B8=BA=E4=B8=80=E4=B8=AAKconfig=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/Kconfig | 57 ++-------------------------------- components/libc/posix/Kconfig | 58 +++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 55 deletions(-) create mode 100644 components/libc/posix/Kconfig diff --git a/components/libc/Kconfig b/components/libc/Kconfig index dfbe73aa14..69f8e1ae36 100644 --- a/components/libc/Kconfig +++ b/components/libc/Kconfig @@ -1,7 +1,7 @@ menu "POSIX layer and C standard library" config RT_USING_LIBC - bool "Enable libc APIs from toolchain" + bool "Enable libc APIs from the toolchain" default n if RT_USING_LIBC @@ -37,59 +37,6 @@ config RT_LIBC_DEFAULT_TIMEZONE range -12 12 default 8 -config RT_USING_POSIX_FS - bool "Enable POSIX file system, open()/read()/write()/close() etc" - select RT_USING_DFS - select DFS_USING_POSIX - default n - -if RT_USING_POSIX_FS - config RT_USING_POSIX_DEVIO - bool "Enable devices as file descriptors" - select RT_USING_DFS_DEVFS - default n - - config RT_USING_POSIX_POLL - bool "Enable poll()" - default n - - config RT_USING_POSIX_SELECT - bool "Enable select()" - select RT_USING_POSIX_POLL - default n -endif - -config RT_USING_POSIX_DELAY - bool "Enable delay APIs, sleep()/usleep()/msleep() etc" - default n - -config RT_USING_POSIX_GETLINE - bool "Enable getline()/getdelim()" - select RT_USING_LIBC - select RT_LIBC_USING_FILEIO - default n - -config RT_USING_POSIX_MMAP - bool "Enable mmap()" - select RT_USING_POSIX_FS - default n - -config RT_USING_POSIX_TERMIOS - bool "Enable termios APIs" - default n - -config RT_USING_POSIX_AIO - bool "Enable AIO APIs" - default n - -config RT_USING_PTHREADS - bool "Enable pthreads APIs" - default n - -if RT_USING_PTHREADS - config PTHREAD_NUM_MAX - int "Maximum number of pthreads" - default 8 -endif +source "$RTT_DIR/components/libc/posix/Kconfig" endmenu diff --git a/components/libc/posix/Kconfig b/components/libc/posix/Kconfig new file mode 100644 index 0000000000..0afff161ff --- /dev/null +++ b/components/libc/posix/Kconfig @@ -0,0 +1,58 @@ +menu "POSIX (Portable Operating System Interface) layer" + +config RT_USING_POSIX_FS + bool "Enable POSIX file system, open()/read()/write()/close() etc" + select RT_USING_DFS + select DFS_USING_POSIX + default n + +if RT_USING_POSIX_FS + config RT_USING_POSIX_DEVIO + bool "Enable devices as file descriptors" + select RT_USING_DFS_DEVFS + default n + + config RT_USING_POSIX_POLL + bool "Enable poll()" + default n + + config RT_USING_POSIX_SELECT + bool "Enable select()" + select RT_USING_POSIX_POLL + default n +endif + +config RT_USING_POSIX_DELAY + bool "Enable delay APIs, sleep()/usleep()/msleep() etc" + default n + +config RT_USING_POSIX_GETLINE + bool "Enable getline()/getdelim()" + select RT_USING_LIBC + select RT_LIBC_USING_FILEIO + default n + +config RT_USING_POSIX_MMAP + bool "Enable mmap()" + select RT_USING_POSIX_FS + default n + +config RT_USING_POSIX_TERMIOS + bool "Enable termios APIs" + default n + +config RT_USING_POSIX_AIO + bool "Enable AIO APIs" + default n + +config RT_USING_PTHREADS + bool "Enable pthreads APIs" + default n + +if RT_USING_PTHREADS + config PTHREAD_NUM_MAX + int "Maximum number of pthreads" + default 8 +endif + +endmenu