Lines Matching refs:queue
40 void **queue; member
51 return r->queue[r->producer]; in __ptr_ring_full()
106 if (unlikely(!r->size) || r->queue[r->producer]) in __ptr_ring_produce()
113 WRITE_ONCE(r->queue[r->producer++], ptr); in __ptr_ring_produce()
172 return READ_ONCE(r->queue[r->consumer_head]); in __ptr_ring_peek()
197 return !r->queue[READ_ONCE(r->consumer_head)]; in __ptr_ring_empty()
280 r->queue[head--] = NULL; in __ptr_ring_discard_one()
477 r->batch = SMP_CACHE_BYTES * 2 / sizeof(*(r->queue)); in __ptr_ring_set_size()
489 r->queue = __ptr_ring_init_queue_alloc(size, gfp); in ptr_ring_init()
490 if (!r->queue) in ptr_ring_init()
529 r->queue[head--] = NULL; in ptr_ring_unconsume()
540 if (r->queue[head]) { in ptr_ring_unconsume()
544 r->queue[head] = batch[--n]; in ptr_ring_unconsume()
558 static inline void **__ptr_ring_swap_queue(struct ptr_ring *r, void **queue, in __ptr_ring_swap_queue() argument
568 queue[producer++] = ptr; in __ptr_ring_swap_queue()
578 old = r->queue; in __ptr_ring_swap_queue()
579 r->queue = queue; in __ptr_ring_swap_queue()
594 void **queue = __ptr_ring_init_queue_alloc(size, gfp); in ptr_ring_resize() local
597 if (!queue) in ptr_ring_resize()
603 old = __ptr_ring_swap_queue(r, queue, size, gfp, destroy); in ptr_ring_resize()
671 kvfree(r->queue); in ptr_ring_cleanup()