Home | History | Annotate | Download | only in lib

Lines Matching defs:al

66 		struct axmap_level *al = &axmap->levels[i];
68 memset(al->map, 0, al->map_size * sizeof(unsigned long));
109 struct axmap_level *al = &axmap->levels[i];
111 al->level = i;
112 al->map_size = (nr_bits + BLOCKS_PER_UNIT - 1) >> UNIT_SHIFT;
113 al->map = malloc(al->map_size * sizeof(unsigned long));
114 if (!al->map)
136 struct axmap_level *al;
144 al = &axmap->levels[i];
146 if (func(al, offset, bit, data))
157 struct axmap_level *al;
165 al = &axmap->levels[i];
167 if (func(al, offset, bit, data))
174 static int axmap_clear_fn(struct axmap_level *al, unsigned long offset,
177 if (!(al->map[offset] & (1UL << bit)))
180 al->map[offset] &= ~(1UL << bit);
216 static int axmap_set_fn(struct axmap_level *al, unsigned long offset,
230 overlap = al->map[offset] & mask;
243 assert(!(al->map[offset] & mask));
245 al->map[offset] |= mask;
247 if (!al->level)
251 return al->map[offset] != -1UL;
318 static int axmap_isset_fn(struct axmap_level *al, unsigned long offset,
321 return (al->map[offset] & (1UL << bit)) != 0;
343 struct axmap_level *al = &axmap->levels[i];
348 if (index >= al->map_size) {
353 for (j = index; j < al->map_size; j++) {
354 if (al->map[j] == -1UL)
361 ret = index = (j << UNIT_SHIFT) + ffz(al->map[j]);
387 static int axmap_next_free_fn(struct axmap_level *al, unsigned long offset,
393 if (!(mask & ~al->map[offset]))
396 if (al->map[offset] != -1UL) {
397 data->level = al->level;