summaryrefslogtreecommitdiff
path: root/src/register.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/register.c')
-rw-r--r--src/register.c12
1 files changed, 12 insertions, 0 deletions
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)
{