]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/posix-eventfd: Remove posix-fdtab dependency
authorAndrei Tatar <andrei@unikraft.io>
Thu, 22 Feb 2024 19:28:24 +0000 (20:28 +0100)
committerUnikraft Bot <monkey@unikraft.io>
Tue, 4 Feb 2025 10:22:02 +0000 (10:22 +0000)
This change makes posix-fdtab no longer a hard dependency of
posix-eventfd, allowing non-fd parts of its functionality to work
without the former selected.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Sergiu Moga <sergiu@unikraft.io>
GitHub-Closes: #1437

lib/posix-eventfd/Config.uk
lib/posix-eventfd/eventfd.c
lib/posix-eventfd/include/uk/posix-eventfd.h

index 1ad12a42bae1aa583e73be7eea082bd57f5bf729..13232b342bf7b49fc44b612ea2ebfe1768da0ca6 100644 (file)
@@ -1,5 +1,4 @@
 config LIBPOSIX_EVENTFD
        bool "posix-eventfd: Support for eventfd files"
        select LIBPOSIX_FDIO
-       select LIBPOSIX_FDTAB
        select LIBNOLIBC if !HAVE_LIBC
index ceee9e5a7a8dcc899337edcfd6e8e355bf1331eb..64416da94e2d75139e474531d0da2a1cc81068f6 100644 (file)
 #include <uk/file/nops.h>
 #include <uk/posix-eventfd.h>
 #include <uk/posix-fd.h>
+
+#if CONFIG_LIBPOSIX_FDTAB
 #include <uk/posix-fdtab.h>
 #include <uk/syscall.h>
+#endif /* CONFIG_LIBPOSIX_FDTAB */
 
 
 static const char EVENTFD_VOLID[] = "eventfd_vol";
@@ -153,6 +156,7 @@ struct uk_file *uk_eventfile_create(unsigned int count, int flags)
        return &al->f;
 }
 
+#if CONFIG_LIBPOSIX_FDTAB
 int uk_sys_eventfd(unsigned int count, int flags)
 {
        int ret;
@@ -182,3 +186,4 @@ UK_SYSCALL_R_DEFINE(int, eventfd2, unsigned int, count, int, flags)
 {
        return uk_sys_eventfd(count, flags);
 }
+#endif /* CONFIG_LIBPOSIX_FDTAB */
index a22e3919bc6a9884991b6e2401a9c06e8f809ba2..712b2181ed5d1ff2053068da378d49371576b644 100644 (file)
@@ -13,6 +13,8 @@
 
 struct uk_file *uk_eventfile_create(unsigned int count, int flags);
 
+#if CONFIG_LIBPOSIX_FDTAB
 int uk_sys_eventfd(unsigned int count, int flags);
+#endif /* CONFIG_LIBPOSIX_FDTAB */
 
 #endif /* __UK_POSIX_EVENTFD_H__ */