Lines Matching refs:get_ring_pos
51 static uint32_t get_ring_pos(uint32_t index) { in get_ring_pos() function
58 return get_ring_pos(read_view - r->write_pos - 1) >= bytes; in ring_buffer_can_write()
64 return get_ring_pos(write_view - r->read_pos) >= bytes; in ring_buffer_can_read()
80 RING_BUFFER_SIZE - get_ring_pos(r->write_pos); in ring_buffer_write()
85 &r->buf[get_ring_pos(r->write_pos)], in ring_buffer_write()
89 &r->buf[get_ring_pos(r->write_pos + available_at_end)], in ring_buffer_write()
94 &r->buf[get_ring_pos(r->write_pos)], in ring_buffer_write()
119 RING_BUFFER_SIZE - get_ring_pos(r->read_pos); in ring_buffer_read()
125 &r->buf[get_ring_pos(r->read_pos)], in ring_buffer_read()
129 &r->buf[get_ring_pos(r->read_pos + available_at_end)], in ring_buffer_read()
134 &r->buf[get_ring_pos(r->read_pos)], in ring_buffer_read()
254 return get_ring_pos(write_view - r->read_pos); in ring_buffer_available_read()
267 return get_ring_pos(read_view - r->write_pos - 1); in ring_buffer_available_write()
286 RING_BUFFER_SIZE - get_ring_pos(r->write_pos); in ring_buffer_copy_contents()
311 &r->buf[get_ring_pos(r->read_pos)], in ring_buffer_copy_contents()
314 &r->buf[get_ring_pos(r->read_pos + available_at_end)], in ring_buffer_copy_contents()
318 &r->buf[get_ring_pos(r->read_pos)], in ring_buffer_copy_contents()