Lines Matching refs:rb
263 static int queue_get(struct ring_buffer *rb, void **mem_block, size_t *size) in queue_get() argument
269 if (rb->tail == rb->head) { in queue_get()
274 *mem_block = rb->buf[rb->tail].mem_block; in queue_get()
275 *size = rb->buf[rb->tail].size; in queue_get()
276 MODULO_INC(rb->tail, rb->len); in queue_get()
285 static int queue_put(struct ring_buffer *rb, void *mem_block, size_t size) in queue_put() argument
292 head_next = rb->head; in queue_put()
293 MODULO_INC(head_next, rb->len); in queue_put()
295 if (head_next == rb->tail) { in queue_put()
301 rb->buf[rb->head].mem_block = mem_block; in queue_put()
302 rb->buf[rb->head].size = size; in queue_put()
303 rb->head = head_next; in queue_put()