Skip to content

Commit 88b5e5d

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 <cfriedt@tenstorrent.com>
1 parent a4f6b31 commit 88b5e5d

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
@@ -23,7 +23,7 @@ if (NOT CONFIG_TC_PROVIDES_POSIX_SIGNALS)
2323
endif()
2424

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

3434
zephyr_library()
35-
zephyr_library_sources_ifdef(CONFIG_EVENTFD eventfd.c)
3635

3736
if (NOT CONFIG_TC_PROVIDES_POSIX_ASYNCHRONOUS_IO)
3837
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)