Lines Matching full:producer
14 * single producer and a single consumer CPU.
31 int producer ____cacheline_aligned_in_smp;
36 /* Shared consumer/producer data */
37 /* Read-only by both the producer and the consumer */
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()
114 if (unlikely(r->producer >= r->size)) in __ptr_ring_produce()
115 r->producer = 0; in __ptr_ring_produce()
120 * Note: resize (below) nests producer lock within consumer lock, so if you
250 * index and zero out the entry so producer can reuse it. in __ptr_ring_discard_one()
257 * but that is suboptimal when the ring is full as producer is writing in __ptr_ring_discard_one()
268 * the ring all at once so producer can reuse their space in the ring. in __ptr_ring_discard_one()
275 * cache line that producer might currently be reading the last; in __ptr_ring_discard_one()
276 * producer won't make progress and touch other cache lines in __ptr_ring_discard_one()
323 * Note: resize (below) nests producer lock within consumer lock, so if you
494 r->producer = r->consumer_head = r->consumer_tail = 0; in ptr_ring_init()
506 * Note: producer lock is nested within consumer lock, so if you
562 int producer = 0; in __ptr_ring_swap_queue() local
567 if (producer < size) in __ptr_ring_swap_queue()
568 queue[producer++] = ptr; in __ptr_ring_swap_queue()
572 if (producer >= size) in __ptr_ring_swap_queue()
573 producer = 0; in __ptr_ring_swap_queue()
575 r->producer = producer; in __ptr_ring_swap_queue()
585 * Note: producer lock is nested within consumer lock, so if you
614 * Note: producer lock is nested within consumer lock, so if you