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

Function increment_idx

freebsd/net/mp_ring.c:72–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72static inline uint16_t
73increment_idx(struct ifmp_ring *r, uint16_t idx, uint16_t n)
74{
75 int x = r->size - idx;
76
77 MPASS(x > 0);
78 return (x > n ? idx + n : n - x);
79}
80
81/* Consumer is about to update the ring's state to s */
82static inline uint16_t

Callers 3

drain_ring_lockedFunction · 0.85
drain_ring_locklessFunction · 0.85
ifmp_ring_enqueueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected