bitmap: fix off-by-8 allocation error
[fio.git] / lib / bitmap.h
CommitLineData
51ede0b1
JA
1#ifndef FIO_BITMAP_H
2#define FIO_BITMAP_H
3
4#include <inttypes.h>
5
6struct bitmap;
7struct bitmap *bitmap_new(unsigned long nr_bits);
8void bitmap_free(struct bitmap *bm);
9
10void bitmap_clear(struct bitmap *bitmap, uint64_t bit_nr);
11void bitmap_set(struct bitmap *bitmap, uint64_t bit_nr);
12unsigned int bitmap_set_nr(struct bitmap *bitmap, uint64_t bit_nr, unsigned int nr_bits);
13int bitmap_isset(struct bitmap *bitmap, uint64_t bit_nr);
14uint64_t bitmap_first_free(struct bitmap *bitmap);
15uint64_t bitmap_next_free(struct bitmap *bitmap, uint64_t bit_nr);
16void bitmap_reset(struct bitmap *bitmap);
17
18#endif