Skip to content

Commit e9741b5

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 781011b commit e9741b5

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
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
@@ -25,7 +25,7 @@ if (NOT CONFIG_TC_PROVIDES_POSIX_SIGNALS)
2525
endif()
2626

2727
if(CONFIG_POSIX_API OR CONFIG_POSIX_THREADS OR CONFIG_POSIX_TIMERS OR
28-
CONFIG_POSIX_MESSAGE_PASSING OR CONFIG_POSIX_FILE_SYSTEM OR CONFIG_EVENTFD OR
28+
CONFIG_POSIX_MESSAGE_PASSING OR CONFIG_POSIX_FILE_SYSTEM OR
2929
CONFIG_POSIX_C_LIB_EXT OR CONFIG_POSIX_SINGLE_PROCESS)
3030
# This is a temporary workaround so that Newlib declares the appropriate
3131
# types for us. POSIX features to be formalized as part of #51211
@@ -34,7 +34,6 @@ if(CONFIG_POSIX_API OR CONFIG_POSIX_THREADS OR CONFIG_POSIX_TIMERS OR
3434
endif()
3535

3636
zephyr_library()
37-
zephyr_library_sources_ifdef(CONFIG_EVENTFD eventfd.c)
3837

3938
if (NOT CONFIG_TC_PROVIDES_POSIX_ASYNCHRONOUS_IO)
4039
zephyr_library_sources_ifdef(CONFIG_POSIX_ASYNCHRONOUS_IO aio.c)

0 commit comments

Comments
 (0)