X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=lib%2Faxmap.h;fp=lib%2Faxmap.h;h=edfeba80d854463eb0ada915d22bf493d7df4cb9;hp=0000000000000000000000000000000000000000;hb=7ebd796f4e50c21d652e62bf1e112755b0f338a8;hpb=dbfb51e3e742a2bfd151dc46aaf9e944da92a13b diff --git a/lib/axmap.h b/lib/axmap.h new file mode 100644 index 00000000..edfeba80 --- /dev/null +++ b/lib/axmap.h @@ -0,0 +1,18 @@ +#ifndef FIO_BITMAP_H +#define FIO_BITMAP_H + +#include + +struct axmap; +struct axmap *axmap_new(unsigned long nr_bits); +void axmap_free(struct axmap *bm); + +void axmap_clear(struct axmap *axmap, uint64_t bit_nr); +void axmap_set(struct axmap *axmap, uint64_t bit_nr); +unsigned int axmap_set_nr(struct axmap *axmap, uint64_t bit_nr, unsigned int nr_bits); +int axmap_isset(struct axmap *axmap, uint64_t bit_nr); +uint64_t axmap_first_free(struct axmap *axmap); +uint64_t axmap_next_free(struct axmap *axmap, uint64_t bit_nr); +void axmap_reset(struct axmap *axmap); + +#endif