Lines Matching refs:rb
116 static int queue_get(struct ring_buffer *rb, void **mem_block, size_t *size) in queue_get() argument
122 if (rb->tail == rb->head) { in queue_get()
128 *mem_block = rb->buf[rb->tail].mem_block; in queue_get()
129 *size = rb->buf[rb->tail].size; in queue_get()
130 MODULO_INC(rb->tail, rb->len); in queue_get()
140 static int queue_put(struct ring_buffer *rb, void *mem_block, size_t size) in queue_put() argument
147 head_next = rb->head; in queue_put()
148 MODULO_INC(head_next, rb->len); in queue_put()
150 if (head_next == rb->tail) { in queue_put()
156 rb->buf[rb->head].mem_block = mem_block; in queue_put()
157 rb->buf[rb->head].size = size; in queue_put()
158 rb->head = head_next; in queue_put()