diff options
Diffstat (limited to 'ewah/bitmap.c')
-rw-r--r-- | ewah/bitmap.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ewah/bitmap.c b/ewah/bitmap.c index b5fed9621f..d8cec585af 100644 --- a/ewah/bitmap.c +++ b/ewah/bitmap.c @@ -50,6 +50,14 @@ void bitmap_set(struct bitmap *self, size_t pos) self->words[block] |= EWAH_MASK(pos); } +void bitmap_unset(struct bitmap *self, size_t pos) +{ + size_t block = EWAH_BLOCK(pos); + + if (block < self->word_alloc) + self->words[block] &= ~EWAH_MASK(pos); +} + int bitmap_get(struct bitmap *self, size_t pos) { size_t block = EWAH_BLOCK(pos); |