Lines Matching refs:offset
119 int offset = nr & BITS_PER_PAGE_MASK; in free_pidmap() local
121 clear_bit(offset, map->page); in free_pidmap()
127 int i, offset, max_scan, pid, last = pid_ns->last_pid; in alloc_pidmap() local
133 offset = pid & BITS_PER_PAGE_MASK; in alloc_pidmap()
135 max_scan = (pid_max + BITS_PER_PAGE - 1)/BITS_PER_PAGE - !offset; in alloc_pidmap()
154 if (!test_and_set_bit(offset, map->page)) { in alloc_pidmap()
159 offset = find_next_offset(map, offset); in alloc_pidmap()
160 pid = mk_pid(pid_ns, map, offset); in alloc_pidmap()
167 } while (offset < BITS_PER_PAGE && pid < pid_max && in alloc_pidmap()
173 offset = 0; in alloc_pidmap()
176 offset = RESERVED_PIDS; in alloc_pidmap()
177 if (unlikely(last == offset)) in alloc_pidmap()
180 pid = mk_pid(pid_ns, map, offset); in alloc_pidmap()
187 int offset; in next_pidmap() local
190 offset = (last + 1) & BITS_PER_PAGE_MASK; in next_pidmap()
193 for (; map < end; map++, offset = 0) { in next_pidmap()
196 offset = find_next_bit((map)->page, BITS_PER_PAGE, offset); in next_pidmap()
197 if (offset < BITS_PER_PAGE) in next_pidmap()
198 return mk_pid(pid_ns, map, offset); in next_pidmap()