summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/liburing.h1
-rw-r--r--src/liburing.map2
-rw-r--r--src/register.c12
3 files changed, 15 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index eaeda86..d2a16f6 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -102,6 +102,7 @@ extern int io_uring_unregister_files(struct io_uring *ring);
extern int io_uring_register_files_update(struct io_uring *ring, unsigned off,
int *files, unsigned nr_files);
extern int io_uring_register_eventfd(struct io_uring *ring, int fd);
+extern int io_uring_register_eventfd_async(struct io_uring *ring, int fd);
extern int io_uring_unregister_eventfd(struct io_uring *ring);
extern int io_uring_register_probe(struct io_uring *ring,
struct io_uring_probe *p, unsigned nr);
diff --git a/src/liburing.map b/src/liburing.map
index 055058f..8281f3d 100644
--- a/src/liburing.map
+++ b/src/liburing.map
@@ -51,4 +51,6 @@ LIBURING_0.5 {
} LIBURING_0.4;
LIBURING_0.6 {
+ global:
+ io_uring_register_eventfd_async;
} LIBURING_0.5;
diff --git a/src/register.c b/src/register.c
index f50473b..327a8ce 100644
--- a/src/register.c
+++ b/src/register.c
@@ -111,6 +111,18 @@ int io_uring_unregister_eventfd(struct io_uring *ring)
return 0;
}
+int io_uring_register_eventfd_async(struct io_uring *ring, int event_fd)
+{
+ int ret;
+
+ ret = __sys_io_uring_register(ring->ring_fd, IORING_REGISTER_EVENTFD_ASYNC,
+ &event_fd, 1);
+ if (ret < 0)
+ return -errno;
+
+ return 0;
+}
+
int io_uring_register_probe(struct io_uring *ring, struct io_uring_probe *p,
unsigned int nr_ops)
{