Skip to content

Commit 8dc69e0

Browse files
pfalconnashif
authored andcommitted
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 <[email protected]>
1 parent c152ebd commit 8dc69e0

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ endif()
77
add_subdirectory_if_kconfig(ring_buffer)
88
add_subdirectory_if_kconfig(base64)
99
add_subdirectory(mempool)
10-
add_subdirectory_ifdef(CONFIG_PTHREAD_IPC posix)
10+
add_subdirectory_ifdef(CONFIG_POSIX_API posix)
1111
add_subdirectory_ifdef(CONFIG_CMSIS_RTOS_V1 cmsis_rtos_v1)
1212
add_subdirectory(rbtree)

lib/posix/Kconfig

+11-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
# SPDX-License-Identifier: Apache-2.0
55
#
66

7+
config POSIX_API
8+
bool "POSIX APIs"
9+
help
10+
Enable mostly-standards-compliant implementations of
11+
various POSIX (IEEE 1003.1) APIs.
12+
13+
if POSIX_API
14+
715
config PTHREAD_IPC
816
bool "POSIX pthread IPC API"
917
help
@@ -26,6 +34,8 @@ config SEM_VALUE_MAX
2634
help
2735
Maximum semaphore count in POSIX compliant Application.
2836

37+
endif # PTHREAD_IPC
38+
2939
config MAX_TIMER_COUNT
3040
int "Maximum timer count in POSIX application"
3141
default 5
@@ -76,4 +86,4 @@ config POSIX_MAX_OPEN_FILES
7686
endif
7787
endif
7888

79-
endif
89+
endif # POSIX_API

0 commit comments

Comments
 (0)