Lines Matching defs:os
104 drain_ring(struct mp_ring *r, union ring_state os, uint16_t prev, int budget)
108 uint16_t cidx = os.cidx;
109 uint16_t pidx = os.pidx_tail;
111 MPASS(os.flags == BUSY);
126 os.state = ns.state = r->state;
129 } while (atomic_cmpset_64(&r->state, os.state,
153 os.state = ns.state = r->state;
156 } while (atomic_cmpset_acq_64(&r->state, os.state, ns.state) == 0);
251 union ring_state os, ns;
263 os.state = r->state;
264 if (n >= space_available(r, os)) {
266 MPASS(os.flags != IDLE);
267 if (os.flags == STALLED)
271 ns.state = os.state;
272 ns.pidx_head = increment_idx(r, os.pidx_head, n);
274 if (atomic_cmpset_64(&r->state, os.state, ns.state))
279 pidx_start = os.pidx_head;
305 os.state = ns.state = r->state;
308 } while (atomic_cmpset_rel_64(&r->state, os.state, ns.state) == 0);
316 if (os.flags != BUSY)
317 drain_ring(r, ns, os.flags, budget);
325 union ring_state os, ns;
327 os.state = r->state;
328 if (os.flags != STALLED || os.pidx_head != os.pidx_tail ||
332 MPASS(os.cidx != os.pidx_tail); /* implied by STALLED */
333 ns.state = os.state;
340 if (!atomic_cmpset_acq_64(&r->state, os.state, ns.state))
343 drain_ring(r, ns, os.flags, budget);