MCPcopy Create free account
hub / github.com/F-Stack/f-stack / state_to_flags

Function state_to_flags

freebsd/net/mp_ring.c:82–92  ·  view source on GitHub ↗

Consumer is about to update the ring's state to s */

Source from the content-addressed store, hash-verified

80
81/* Consumer is about to update the ring's state to s */
82static inline uint16_t
83state_to_flags(union ring_state s, int abdicate)
84{
85
86 if (s.cidx == s.pidx_tail)
87 return (IDLE);
88 else if (abdicate && s.pidx_tail != s.pidx_head)
89 return (ABDICATED);
90
91 return (BUSY);
92}
93
94#ifdef MP_RING_NO_64BIT_ATOMICS
95static void

Callers 2

drain_ring_lockedFunction · 0.85
drain_ring_locklessFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected