Lines Matching defs:offset
24 * Returns offset in the map or -1 if out of space.
30 int offset, count; /* siamese twins */
55 offset = t->first_free;
57 offset = t->last_off & ~align1;
60 off_new = find_next_zero_bit(t->map, t->size, offset);
62 count += off_new - offset;
63 offset = off_new;
64 if (offset >= t->size)
65 offset = 0;
70 t->size, t->used, offset, len, align, count);
74 if (offset + len > t->size) {
75 count += t->size - offset;
76 offset = 0;
81 while (test_bit(offset + i, t->map) == 0) {
84 bitmap_set(t->map, offset, len);
85 if (offset == t->first_free)
89 if ((t->last_off = offset + len) >= t->size)
94 return offset;
98 if ((offset += i + 1) >= t->size)
99 offset = 0;
103 void bit_map_clear(struct bit_map *t, int offset, int len)
111 if (test_bit(offset + i, t->map) == 0)
113 __clear_bit(offset + i, t->map);
115 if (offset < t->first_free)
116 t->first_free = offset;