Lines Matching defs:pos
140 int pos;
142 pos = size / BITS_PER_LONG;
144 bit = BITS_PER_LONG * pos;
145 addr += pos;
151 while (--pos) {
165 int pos;
169 pos = offset / BITS_PER_LONG;
171 bit = BITS_PER_LONG * pos;
172 addr += pos;
203 int pos;
207 pos = offset / BITS_PER_LONG;
209 bit = BITS_PER_LONG * pos;
210 addr += pos;
449 static int __reg_op(unsigned long *bitmap, int pos, int order, int reg_op) {
463 index = pos / BITS_PER_LONG;
464 offset = pos - (index * BITS_PER_LONG);
513 int pos, end; /*scans bitmap by regions of size order*/
515 for (pos = 0; (end = pos + (1 << order)) <= bits; pos = end) {
516 if (!__reg_op(bitmap, pos, order, REG_OP_ISFREE))
518 __reg_op(bitmap, pos, order, REG_OP_ALLOC);
519 return pos;
527 * @pos: beginning of bit region to allocate
537 bitmap_allocate_region(unsigned long *bitmap, int pos, int order)
539 if (!__reg_op(bitmap, pos, order, REG_OP_ISFREE))
541 __reg_op(bitmap, pos, order, REG_OP_ALLOC);
548 * @pos: beginning of bit region to release
557 bitmap_release_region(unsigned long *bitmap, int pos, int order)
559 __reg_op(bitmap, pos, order, REG_OP_RELEASE);