-
Notifications
You must be signed in to change notification settings - Fork 411
/
Copy pathio_uring_free_buf_ring.3
53 lines (49 loc) · 1.41 KB
/
io_uring_free_buf_ring.3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.\" Copyright (C) 2022 Jens Axboe <[email protected]>
.\"
.\" SPDX-License-Identifier: LGPL-2.0-or-later
.\"
.TH io_uring_free_buf_ring 3 "Mar 07, 2023" "liburing-2.4" "liburing Manual"
.SH NAME
io_uring_free_buf_ring \- register and free a buffer ring for provided buffers
.SH SYNOPSIS
.nf
.B #include <liburing.h>
.PP
.BI "int io_uring_free_buf_ring(struct io_uring *" ring ",
.BI " struct io_uring_buf_ring *" br ",
.BI " unsigned int " nentries ",
.BI " int " bgid ");"
.BI "
.fi
.SH DESCRIPTION
.PP
The
.BR io_uring_free_buf_ring (3)
function unregisters a previously registered shared buffer ring. The ring must
have heen previously returned from
.BR io_uring_setup_buf_ring (3) .
The
.I ring
argument must pointer to the ring for which the provided buffer ring is being
registered,
.I br
must point to a buffer ring previously returned by
.BR io_uring_setup_buf_ring (3) ,
.I nentries
is the number of entries requested in the buffer ring, and
.I bgid
is the buffer group ID that
.I br
was setup with.
Under the covers, this function uses
.BR io_uring_unregister_buf_ring (3)
to unregister the ring, and handles the freeing of the ring rather than
letting the application open code it.
Available since 5.19.
.SH RETURN VALUE
On success
.BR io_uring_free_buf_ring (3)
returns zero. On failure it returns
.BR -errno .
.SH SEE ALSO
.BR io_uring_setup_buf_ring (3)