summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-02-24 16:37:23 -0700
committerJens Axboe <axboe@kernel.dk>2020-02-24 16:37:23 -0700
commit59d0acf1c21cac6f3b46fd8243849982310e4195 (patch)
tree1a19dd9c4d8990309f1881092b73fa80ec2c40da
parent02c7cac133ca48134455cb87564432f912d5788b (diff)
downloadliburing-59d0acf1c21cac6f3b46fd8243849982310e4195.tar.gz
liburing-59d0acf1c21cac6f3b46fd8243849982310e4195.tar.bz2
Reinstate io_uring_unregister_eventfd()
When the probe registration was added, this got inadvertently deleted. Oops... Fixes: ec0ce0168742 ("Add io_uring_register_probe()") Fixes: https://github.com/axboe/liburing/issues/86 Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--src/register.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/register.c b/src/register.c
index eb9af19..f50473b 100644
--- a/src/register.c
+++ b/src/register.c
@@ -99,6 +99,18 @@ int io_uring_register_eventfd(struct io_uring *ring, int event_fd)
return 0;
}
+int io_uring_unregister_eventfd(struct io_uring *ring)
+{
+ int ret;
+
+ ret = __sys_io_uring_register(ring->ring_fd, IORING_UNREGISTER_EVENTFD,
+ NULL, 0);
+ 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)
{