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
config LIBPOSIX_EVENTFD
bool "posix-eventfd: Support for eventfd files"
select LIBPOSIX_FDIO
- select LIBPOSIX_FDTAB
select LIBNOLIBC if !HAVE_LIBC
#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";
return &al->f;
}
+#if CONFIG_LIBPOSIX_FDTAB
int uk_sys_eventfd(unsigned int count, int flags)
{
int ret;
{
return uk_sys_eventfd(count, flags);
}
+#endif /* CONFIG_LIBPOSIX_FDTAB */
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__ */