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

Function replenish_buffer

examples/proxy.c:905–913  ·  view source on GitHub ↗

* We're done with this buffer, add it back to our pool so the kernel is * free to use it again. */

Source from the content-addressed store, hash-verified

903 * free to use it again.
904 */
905static int replenish_buffer(struct conn_buf_ring *cbr, int bid, int offset)
906{
907 void *this_buf = cbr->buf + bid * buf_size;
908
909 assert(bid < nr_bufs);
910
911 io_uring_buf_ring_add(cbr->br, this_buf, buf_size, bid, br_mask, offset);
912 return buf_size;
913}
914
915/*
916 * Iterate buffers from '*bid' and with a total size of 'bytes' and add them

Callers 2

replenish_buffersFunction · 0.85
handle_send_bufFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected