Skip to content

Commit 6207b66

Browse files
committed
eventfd: bring config to top-level of posix dir, since it is not posix
The eventfd configuration does not need to be so deeply nested within POSIX since it does not depend on POSIX completely. Signed-off-by: Chris Friedt <[email protected]>
1 parent 8b934dc commit 6207b66

File tree

7 files changed

+10
-9
lines changed

7 files changed

+10
-9
lines changed

lib/posix/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# SPDX-License-Identifier: Apache-2.0
22

33
add_subdirectory(options)
4+
add_subdirectory_ifdef(CONFIG_EVENTFD eventfd)
45
add_subdirectory_ifdef(CONFIG_POSIX_SHELL shell)

lib/posix/Kconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ menu "POSIX API Support"
77
rsource "options/Kconfig"
88
rsource "shell/Kconfig"
99

10-
endmenu # "POSIX API Support"
10+
endmenu
11+
12+
# Eventfd Support (not officially POSIX)
13+
rsource "eventfd/Kconfig"

lib/posix/eventfd/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
zephyr_library()
4+
zephyr_library_sources(eventfd.c)

lib/posix/options/Kconfig.compat renamed to lib/posix/eventfd/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
#
44
# SPDX-License-Identifier: Apache-2.0
55

6-
menu "Miscellaneous POSIX-related options"
7-
86
config EVENTFD
97
bool "Support for eventfd"
108
depends on !NATIVE_APPLICATION
@@ -14,5 +12,3 @@ config EVENTFD
1412
Enable support for event file descriptors, eventfd. An eventfd can
1513
be used as an event wait/notify mechanism together with POSIX calls
1614
like read, write and poll.
17-
18-
endmenu
File renamed without changes.

lib/posix/options/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (NOT CONFIG_TC_PROVIDES_POSIX_SIGNALS)
2727
endif()
2828

2929
if(CONFIG_POSIX_API OR CONFIG_POSIX_THREADS OR CONFIG_POSIX_TIMERS OR
30-
CONFIG_POSIX_MESSAGE_PASSING OR CONFIG_POSIX_FILE_SYSTEM OR CONFIG_EVENTFD OR
30+
CONFIG_POSIX_MESSAGE_PASSING OR CONFIG_POSIX_FILE_SYSTEM OR
3131
CONFIG_POSIX_C_LIB_EXT OR CONFIG_POSIX_SINGLE_PROCESS)
3232
# This is a temporary workaround so that Newlib declares the appropriate
3333
# types for us. POSIX features to be formalized as part of #51211
@@ -36,7 +36,6 @@ if(CONFIG_POSIX_API OR CONFIG_POSIX_THREADS OR CONFIG_POSIX_TIMERS OR
3636
endif()
3737

3838
zephyr_library()
39-
zephyr_library_sources_ifdef(CONFIG_EVENTFD eventfd.c)
4039

4140
if (NOT CONFIG_TC_PROVIDES_POSIX_ASYNCHRONOUS_IO)
4241
zephyr_library_sources_ifdef(CONFIG_POSIX_ASYNCHRONOUS_IO aio.c)

lib/posix/options/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ rsource "Kconfig.xsi_threads_ext"
4040

4141
endmenu # "X/Open system interfaces"
4242

43-
rsource "Kconfig.compat"
44-
4543
rsource "Kconfig.toolchain"
4644

4745
endmenu # "POSIX Options"

0 commit comments

Comments
 (0)