Lines Matching refs:upper
61 size_t upper = buffer->size - buffer->first; in read_from_buffer() local
62 size_t lower = length - upper; in read_from_buffer()
65 if (user_memcpy(data, buffer->buffer + buffer->first, upper) < B_OK in read_from_buffer()
66 || user_memcpy(data + upper, buffer->buffer, lower) < B_OK) in read_from_buffer()
69 memcpy(data, buffer->buffer + buffer->first, upper); in read_from_buffer()
70 memcpy(data + upper, buffer->buffer, lower); in read_from_buffer()
104 size_t upper = buffer->size - position; in write_to_buffer() local
105 size_t lower = length - upper; in write_to_buffer()
108 if (user_memcpy(buffer->buffer + position, data, upper) < B_OK in write_to_buffer()
109 || user_memcpy(buffer->buffer, data + upper, lower) < B_OK) in write_to_buffer()
112 memcpy(buffer->buffer + position, data, upper); in write_to_buffer()
113 memcpy(buffer->buffer, data + upper, lower); in write_to_buffer()
260 size_t upper = buffer->size - offset; in ring_buffer_peek() local
261 size_t lower = length - upper; in ring_buffer_peek()
263 memcpy(data, buffer->buffer + offset, upper); in ring_buffer_peek()
264 memcpy((uint8*)data + upper, buffer->buffer, lower); in ring_buffer_peek()
293 size_t upper = buffer->size - buffer->first; in ring_buffer_get_vecs() local
294 size_t lower = buffer->in - upper; in ring_buffer_get_vecs()
297 vecs[0].iov_len = upper; in ring_buffer_get_vecs()
329 size_t upper = from->size - from->first; in ring_buffer_move() local
330 size_t lower = length - upper; in ring_buffer_move()
332 bytesMoved = ring_buffer_write(to, from->buffer + from->first, upper); in ring_buffer_move()
333 if (bytesMoved == upper) { in ring_buffer_move()
367 size_t upper = buffer->size - buffer->first;
368 size_t lower = length - upper;
372 vecs[0].iov_len = upper;