You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bitset.h 518B

12345678910111213141516171819202122232425
  1. #ifndef L2_BITSET_H
  2. #define L2_BITSET_H
  3. #include <stdlib.h>
  4. #include <stdint.h>
  5. typedef long long int l2_bitset_entry;
  6. struct l2_bitset {
  7. l2_bitset_entry *tables;
  8. size_t tableslen;
  9. size_t currtable;
  10. l2_bitset_entry *dirs;
  11. size_t dirslen;
  12. size_t currdir;
  13. };
  14. void l2_bitset_init(struct l2_bitset *bs);
  15. void l2_bitset_free(struct l2_bitset *bs);
  16. int l2_bitset_get(struct l2_bitset *bs, size_t id);
  17. size_t l2_bitset_set_next(struct l2_bitset *bs);
  18. void l2_bitset_unset(struct l2_bitset *bs, size_t id);
  19. #endif