1io_uring_buf_ring_cq_advance(3) liburing Manualio_uring_buf_ring_cq_advance(3)
2
3
4

NAME

6       io_uring_buf_ring_cq_advance  - advance index of provided buffer and CQ
7       ring
8

SYNOPSIS

10       #include <liburing.h>
11
12       void io_uring_buf_ring_cq_advance(struct io_uring *ring,
13                                         struct io_uring_buf_ring *br,
14                                         int count);
15
16       void __io_uring_buf_ring_cq_advance(struct io_uring *ring,
17                                           struct io_uring_buf_ring *br,
18                                           int cq_count,
19                                           int buf_count);
20

DESCRIPTION

22       The io_uring_buf_ring_cq_advance(3) commits count previously added buf‐
23       fers  to  the  shared buffer ring br, making them visible to the kernel
24       and hence consumable. This passes ownership of the buffer to the  ring.
25       At the same time, it advances the CQ ring of ring by count amount. This
26       effectively bundles both  a  io_uring_buf_ring_advance(3)  call  and  a
27       io_uring_cq_advance(3)  into  one operation. Since updating either ring
28       index entails a store memory barrier, doing both at once is more  effi‐
29       cient.
30
31       The __io_uring_buf_ring_cq_advance(3) function performs the same opera‐
32       tion, except it splits the counts into two separate values. It advances
33       the  CQ  ring by cq_count entries, and the buffer ring by buf_count en‐
34       tries rather than increment both by the same value.
35
36

RETURN VALUE

38       None
39

SEE ALSO

41       io_uring_register_buf_ring(3),     io_uring_buf_ring_add(3),     io_ur‐
42       ing_buf_ring_advance(3)
43
44
45
46liburing-2.2                     May 18, 2022  io_uring_buf_ring_cq_advance(3)
Impressum