From 8dc69e09dad6366f2a443e37c7f3d5a7b3c4e2d9 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 27 Sep 2018 18:08:12 +0300 Subject: [PATCH] lib: posix: Add top-level define for all POSIX APIs - CONFIG_POSIX_API It so happened that previously CONFIG_PTHREAD_IPC served this role. But pthreads and IPC is only parts of POSIX, orthogonal to other services. Move CONFIG_POSIX_FS, etc. out from CONFIG_PTHREAD_IPC. Signed-off-by: Paul Sokolovsky --- lib/CMakeLists.txt | 2 +- lib/posix/Kconfig | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index d53371fb9c7..c6770e64f2f 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -7,6 +7,6 @@ endif() add_subdirectory_if_kconfig(ring_buffer) add_subdirectory_if_kconfig(base64) add_subdirectory(mempool) -add_subdirectory_ifdef(CONFIG_PTHREAD_IPC posix) +add_subdirectory_ifdef(CONFIG_POSIX_API posix) add_subdirectory_ifdef(CONFIG_CMSIS_RTOS_V1 cmsis_rtos_v1) add_subdirectory(rbtree) diff --git a/lib/posix/Kconfig b/lib/posix/Kconfig index d8b4262bf89..3fd5adcb588 100644 --- a/lib/posix/Kconfig +++ b/lib/posix/Kconfig @@ -4,6 +4,14 @@ # SPDX-License-Identifier: Apache-2.0 # +config POSIX_API + bool "POSIX APIs" + help + Enable mostly-standards-compliant implementations of + various POSIX (IEEE 1003.1) APIs. + +if POSIX_API + config PTHREAD_IPC bool "POSIX pthread IPC API" help @@ -26,6 +34,8 @@ config SEM_VALUE_MAX help Maximum semaphore count in POSIX compliant Application. +endif # PTHREAD_IPC + config MAX_TIMER_COUNT int "Maximum timer count in POSIX application" default 5 @@ -76,4 +86,4 @@ config POSIX_MAX_OPEN_FILES endif endif -endif +endif # POSIX_API