Home
last modified time | relevance | path

Searched refs:prod_head (Results 1 – 2 of 2) sorted by relevance

/NextBSD/sys/kern/
HDsubr_bufring.c564 uint32_t prod_head, prod_next, cons; in buf_ring_sc_enqueue() local
582 prod_head = br->br_prod_head; in buf_ring_sc_enqueue()
592 …while (BR_HANDOFF(br) && (prod_head & BR_RING_FLAGS_MASK) == BR_RING_OWNED && budget > 0 && domain… in buf_ring_sc_enqueue()
593 prod_head = br->br_prod_head; in buf_ring_sc_enqueue()
594 pidx = BR_INDEX(br, prod_head); in buf_ring_sc_enqueue()
611 prod_next = pidx_next | BR_RING_PENDING | (prod_head & BR_RING_FLAGS_MASK); in buf_ring_sc_enqueue()
615 if (atomic_cmpset_acq_32(&br->br_prod_head, prod_head, prod_next)) { in buf_ring_sc_enqueue()
620 prod_head = br->br_prod_head; in buf_ring_sc_enqueue()
624 prod_head = br->br_prod_head; in buf_ring_sc_enqueue()
625 pidx = BR_INDEX(br, prod_head); in buf_ring_sc_enqueue()
[all …]
/NextBSD/sys/sys/
HDbuf_ring.h184 uint32_t prod_head, prod_next, cons_tail; in buf_ring_enqueue() local
196 prod_head = br->br_prod_head; in buf_ring_enqueue()
197 prod_next = (prod_head + 1) & br->br_prod_mask; in buf_ring_enqueue()
204 if (prod_head != atomic_load_acq_32(&br->br_prod_head) || in buf_ring_enqueue()
212 } while (!atomic_cmpset_acq_32(&br->br_prod_head, prod_head, prod_next)); in buf_ring_enqueue()
214 if (br->br_ring[prod_head].bre_ptr != NULL) in buf_ring_enqueue()
217 br->br_ring[prod_head].bre_ptr = buf; in buf_ring_enqueue()
225 while (br->br_prod_tail != prod_head) in buf_ring_enqueue()