Lines Matching full:write_offset
265 * write_offset = (offset + len) mod size does not change. */
281 size_t write_offset;
286 write_offset = b->offset + b->len;
288 if (write_offset >= b->size) {
290 write_offset -= b->size;
292 max_available = b->offset - write_offset;
295 max_available = b->size - write_offset;
299 *out_buf_offset = write_offset;
471 * becomes empty, to make sure write_offset = (offset + len) % size
536 size_t write_offset;
541 write_offset = b->offset + b->len;
542 if (write_offset >= b->size) {
543 write_offset -= b->size;
545 /* b->buf[write_offset] is the first byte we can write to. */
547 if (write_offset + rest <= b->size) {
551 chunk = b->size - write_offset;
554 memcpy(b->buf + write_offset, buf, chunk);