diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-05-18 13:48:03 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-05-18 14:24:36 -0600 |
commit | bef8c8acae801b30924d074fb8bb31e79f87549c (patch) | |
tree | e562fbf00dde9749e7a5d84b018410718c5375bf /src/register.c | |
parent | c4a10701bd63a11aefe2ee6e0e48006382bd4de0 (diff) | |
download | liburing-bef8c8acae801b30924d074fb8bb31e79f87549c.tar.gz liburing-bef8c8acae801b30924d074fb8bb31e79f87549c.tar.bz2 |
Add io_uring_unregister_buf_ring()
This is the unregister part of registering a shared buffer ring.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src/register.c')
-rw-r--r-- | src/register.c | 8 |
1 files changed, 8 insertions, 0 deletions
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, ®, 1); +} |