Lines Matching refs:bytes
55 bool ring_buffer_can_write(const struct ring_buffer* r, uint32_t bytes) { in ring_buffer_can_write() argument
58 return get_ring_pos(read_view - r->write_pos - 1) >= bytes; in ring_buffer_can_write()
61 bool ring_buffer_can_read(const struct ring_buffer* r, uint32_t bytes) { in ring_buffer_can_read() argument
64 return get_ring_pos(write_view - r->read_pos) >= bytes; in ring_buffer_can_read()
228 uint32_t bytes) { in ring_buffer_view_can_write() argument
232 v, read_view - r->write_pos - 1) >= bytes; in ring_buffer_view_can_write()
238 uint32_t bytes) { in ring_buffer_view_can_read() argument
242 v, write_view - r->read_pos) >= bytes; in ring_buffer_view_can_read()
437 uint32_t bytes, in ring_buffer_wait_write() argument
444 v ? ring_buffer_view_can_write(r, v, bytes) : in ring_buffer_wait_write()
445 ring_buffer_can_write(r, bytes); in ring_buffer_wait_write()
466 v ? ring_buffer_view_can_write(r, v, bytes) : in ring_buffer_wait_write()
467 ring_buffer_can_write(r, bytes); in ring_buffer_wait_write()
476 uint32_t bytes, in ring_buffer_wait_read() argument
483 v ? ring_buffer_view_can_read(r, v, bytes) : in ring_buffer_wait_read()
484 ring_buffer_can_read(r, bytes); in ring_buffer_wait_read()
508 v ? ring_buffer_view_can_read(r, v, bytes) : in ring_buffer_wait_read()
509 ring_buffer_can_read(r, bytes); in ring_buffer_wait_read()
519 uint32_t bytes) { in get_step_size() argument
522 uint32_t res = available < bytes ? available : bytes; in get_step_size()
531 uint32_t bytes) { in ring_buffer_write_fully() argument
532 ring_buffer_write_fully_with_abort(r, v, data, bytes, 0, 0); in ring_buffer_write_fully()
539 uint32_t bytes) { in ring_buffer_read_fully() argument
540 ring_buffer_read_fully_with_abort(r, v, data, bytes, 0, 0); in ring_buffer_read_fully()
547 uint32_t bytes, in ring_buffer_write_fully_with_abort() argument
551 uint32_t candidate_step = get_step_size(r, v, bytes); in ring_buffer_write_fully_with_abort()
556 while (processed < bytes) { in ring_buffer_write_fully_with_abort()
557 if (bytes - processed < candidate_step) { in ring_buffer_write_fully_with_abort()
558 candidate_step = bytes - processed; in ring_buffer_write_fully_with_abort()
584 uint32_t bytes, in ring_buffer_read_fully_with_abort() argument
588 uint32_t candidate_step = get_step_size(r, v, bytes); in ring_buffer_read_fully_with_abort()
593 while (processed < bytes) { in ring_buffer_read_fully_with_abort()
597 if (bytes - processed < candidate_step) { in ring_buffer_read_fully_with_abort()
598 candidate_step = bytes - processed; in ring_buffer_read_fully_with_abort()