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

Function bind_ring

test/vec-regbuf.c:65–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65static void bind_ring(struct buf_desc *bd, struct io_uring *ring, unsigned buf_idx)
66{
67 size_t size = bd->size;
68 struct iovec iov;
69 int ret;
70
71 iov.iov_len = size;
72 iov.iov_base = bd->buf_wr;
73
74 ret = io_uring_register_buffers_update_tag(ring, buf_idx, &iov, NULL, 1);
75 if (ret != 1) {
76 if (geteuid()) {
77 fprintf(stderr, "Not root, skipping\n");
78 exit(T_EXIT_SKIP);
79 }
80 fprintf(stderr, "buf reg failed %i\n", ret);
81 exit(1);
82 }
83 bd->buf_idx = buf_idx;
84}
85
86static void reinit_ring(struct buf_desc *bd)
87{

Callers 1

reinit_ringFunction · 0.85

Tested by

no test coverage detected