@@ -32,7 +32,7 @@ endif
all: $(all_targets)
-liburing_srcs := setup.c queue.c register.c
+liburing_srcs := setup.c queue.c register.c syscall.c
ifeq ($(CONFIG_NOLIBC),y)
liburing_srcs += nolibc.c
@@ -203,6 +203,18 @@ int io_uring_register_notifications(struct io_uring *ring, unsigned nr,
struct io_uring_notification_slot *slots);
int io_uring_unregister_notifications(struct io_uring *ring);
+/*
+ * io_uring syscalls.
+ */
+int io_uring_enter(unsigned int fd, unsigned int to_submit,
+ unsigned int min_complete, unsigned int flags, sigset_t *sig);
+int io_uring_enter2(unsigned int fd, unsigned int to_submit,
+ unsigned int min_complete, unsigned int flags,
+ sigset_t *sig, size_t sz);
+int io_uring_setup(unsigned int entries, struct io_uring_params *p);
+int io_uring_register(unsigned int fd, unsigned int opcode, const void *arg,
+ unsigned int nr_args);
+
/*
* Helper for the peek/wait single cqe functions. Exported because of that,
* but probably shouldn't be used directly in an application.
@@ -62,4 +62,8 @@ LIBURING_2.3 {
io_uring_register_file_alloc_range;
io_uring_register_notifications;
io_uring_unregister_notifications;
+ io_uring_enter;
+ io_uring_enter2;
+ io_uring_setup;
+ io_uring_register;
} LIBURING_2.2;
new file mode 100644
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: MIT */
+
+#include "syscall.h"
+#include <liburing.h>
+
+int io_uring_enter(unsigned int fd, unsigned int to_submit,
+ unsigned int min_complete, unsigned int flags, sigset_t *sig)
+{
+ return __sys_io_uring_enter(fd, to_submit, min_complete, flags, sig);
+}
+
+int io_uring_enter2(unsigned int fd, unsigned int to_submit,
+ unsigned int min_complete, unsigned int flags,
+ sigset_t *sig, size_t sz)
+{
+ return __sys_io_uring_enter2(fd, to_submit, min_complete, flags, sig,
+ sz);
+}
+
+int io_uring_setup(unsigned int entries, struct io_uring_params *p)
+{
+ return __sys_io_uring_setup(entries, p);
+}
+
+int io_uring_register(unsigned int fd, unsigned int opcode, const void *arg,
+ unsigned int nr_args)
+{
+ return __sys_io_uring_register(fd, opcode, arg, nr_args);
+}