Lines Matching refs:offset
29 int offset, count; /* siamese twins */ in bit_map_string_get() local
54 offset = t->first_free; in bit_map_string_get()
56 offset = t->last_off & ~align1; in bit_map_string_get()
59 off_new = find_next_zero_bit(t->map, t->size, offset); in bit_map_string_get()
61 count += off_new - offset; in bit_map_string_get()
62 offset = off_new; in bit_map_string_get()
63 if (offset >= t->size) in bit_map_string_get()
64 offset = 0; in bit_map_string_get()
69 t->size, t->used, offset, len, align, count); in bit_map_string_get()
73 if (offset + len > t->size) { in bit_map_string_get()
74 count += t->size - offset; in bit_map_string_get()
75 offset = 0; in bit_map_string_get()
80 while (test_bit(offset + i, t->map) == 0) { in bit_map_string_get()
83 bitmap_set(t->map, offset, len); in bit_map_string_get()
84 if (offset == t->first_free) in bit_map_string_get()
88 if ((t->last_off = offset + len) >= t->size) in bit_map_string_get()
93 return offset; in bit_map_string_get()
97 if ((offset += i + 1) >= t->size) in bit_map_string_get()
98 offset = 0; in bit_map_string_get()
102 void bit_map_clear(struct bit_map *t, int offset, int len) in bit_map_clear() argument
110 if (test_bit(offset + i, t->map) == 0) in bit_map_clear()
112 __clear_bit(offset + i, t->map); in bit_map_clear()
114 if (offset < t->first_free) in bit_map_clear()
115 t->first_free = offset; in bit_map_clear()