Lines Matching refs:last_idx
48 static int get_randomIdx(int avail_mask, int last_idx)
56 r = get_random8() % last_idx;
57 cmask = ~((2u << (last_idx - r)) - 1);
197 if (mask == (2u<<m->last_idx)-1 && m->freeable) {
220 if (cnt > m->last_idx+1)
221 cnt = m->last_idx+1;
230 int idx = get_randomIdx(mask, m->last_idx);
350 m->last_idx = cnt-1;
396 g->last_idx = 0;
433 idx = get_randomIdx(mask, g->last_idx);