summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/liburing.map1
-rw-r--r--src/register.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/liburing.map b/src/liburing.map
index 287d683..bebdb1d 100644
--- a/src/liburing.map
+++ b/src/liburing.map
@@ -52,4 +52,5 @@ LIBURING_2.2 {
io_uring_unregister_ring_fd;
io_uring_register_files_sparse;
io_uring_register_buf_ring;
+ io_uring_unregister_buf_ring;
} LIBURING_2.1;
diff --git a/src/register.c b/src/register.c
index 986e968..1b5171a 100644
--- a/src/register.c
+++ b/src/register.c
@@ -325,3 +325,11 @@ int io_uring_register_buf_ring(struct io_uring *ring,
return ____sys_io_uring_register(ring->ring_fd,
IORING_REGISTER_PBUF_RING, reg, 1);
}
+
+int io_uring_unregister_buf_ring(struct io_uring *ring, int bgid)
+{
+ struct io_uring_buf_reg reg = { .bgid = bgid };
+
+ return ____sys_io_uring_register(ring->ring_fd,
+ IORING_UNREGISTER_PBUF_RING, &reg, 1);
+}