Lines Matching full:wrap
226 /* Base allocation macros (warning: wrap must be 2^n) */
227 #define SEC_CNT_INIT(sc, cnt, wrap) \ argument
228 (((sc)->cnt) = ((wrap) - 1))
229 #define SEC_ADD(sc, cnt, wrap, val) \ argument
230 ((sc)->cnt = (((sc)->cnt) + (val)) & ((wrap) - 1))
231 #define SEC_INC(sc, cnt, wrap) \ argument
232 SEC_ADD(sc, cnt, wrap, 1)
233 #define SEC_DEC(sc, cnt, wrap) \ argument
234 SEC_ADD(sc, cnt, wrap, -1)
235 #define SEC_GET_GENERIC(sc, tab, cnt, wrap) \ argument
236 ((sc)->tab[SEC_INC(sc, cnt, wrap)])
237 #define SEC_PUT_GENERIC(sc, tab, cnt, wrap, val) \ argument
238 ((sc)->tab[SEC_INC(sc, cnt, wrap)] = val)