MCPcopy Create free account
hub / github.com/axboe/liburing / reinit_ring

Function reinit_ring

test/vec-regbuf.c:86–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86static void reinit_ring(struct buf_desc *bd)
87{
88 struct io_uring *ring = &bd->ring;
89 int ret;
90
91 if (bd->ring_init) {
92 io_uring_queue_exit(ring);
93 bd->ring_init = false;
94 }
95
96 ret = io_uring_queue_init(32, ring, 0);
97 if (ret) {
98 fprintf(stderr, "ring init error %i\n", ret);
99 exit(1);
100 }
101
102 ret = io_uring_register_buffers_sparse(ring, 128);
103 if (ret) {
104 fprintf(stderr, "table reg error %i\n", ret);
105 exit(1);
106 }
107
108 bind_ring(bd, &bd->ring, BUF_BASE_IDX);
109 bd->ring_init = true;
110}
111
112static void init_buffers(struct buf_desc *bd, size_t size)
113{

Callers 3

test_sequenceFunction · 0.85
test_readvFunction · 0.85
test_failFunction · 0.85

Calls 4

io_uring_queue_exitFunction · 0.85
io_uring_queue_initFunction · 0.85
bind_ringFunction · 0.85

Tested by 3

test_sequenceFunction · 0.68
test_readvFunction · 0.68
test_failFunction · 0.68