Lines Matching refs:offset
155 … cbufhead* chdr, void* data, size_t data_offset, size_t numbytes, size_t offset, cbuf_copier_t cop… in cbuf_read_offset() argument
158 if (used_space <= offset) { in cbuf_read_offset()
160 } else if (used_space < offset + numbytes) { in cbuf_read_offset()
161 numbytes = used_space - offset; in cbuf_read_offset()
164 chdr->r_index = (chdr->r_index + offset) % chdr->size; in cbuf_read_offset()
286 size_t cbuf_reass_write(struct cbufhead* chdr, size_t offset, const void* data, size_t data_offset,… in cbuf_reass_write() argument
292 if (offset > free_space) { in cbuf_reass_write()
294 } else if (offset + numbytes > free_space) { in cbuf_reass_write()
295 numbytes = free_space - offset; in cbuf_reass_write()
297 start_index = (cbuf_get_w_index(chdr) + offset) % chdr->size; in cbuf_reass_write()
339 size_t cbuf_reass_count_set(struct cbufhead* chdr, size_t offset, uint8_t* bitmap, size_t limit) { in cbuf_reass_count_set() argument
342 offset = (cbuf_get_w_index(chdr) + offset) % chdr->size; in cbuf_reass_count_set()
343 until_end = bmp_countset(bitmap, bitmap_size, offset, limit); in cbuf_reass_count_set()
344 if (until_end >= limit || until_end < (chdr->size - offset)) { in cbuf_reass_count_set()
350 return until_end + bmp_countset(bitmap, bitmap_size, 0, limit < offset ? limit : offset); in cbuf_reass_count_set()
353 int cbuf_reass_within_offset(struct cbufhead* chdr, size_t offset, size_t index) { in cbuf_reass_within_offset() argument
355 size_t range_end = (range_start + offset) % chdr->size; in cbuf_reass_within_offset()