bitext.h 592 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * bitext.h: Bit string operations on the sparc, specific to architecture.
  3. *
  4. * Copyright 2002 Pete Zaitcev <zaitcev@yahoo.com>
  5. */
  6. #ifndef _SPARC_BITEXT_H
  7. #define _SPARC_BITEXT_H
  8. #include <linux/spinlock.h>
  9. struct bit_map {
  10. spinlock_t lock;
  11. unsigned long *map;
  12. int size;
  13. int used;
  14. int last_off;
  15. int last_size;
  16. int first_free;
  17. int num_colors;
  18. };
  19. int bit_map_string_get(struct bit_map *t, int len, int align);
  20. void bit_map_clear(struct bit_map *t, int offset, int len);
  21. void bit_map_init(struct bit_map *t, unsigned long *map, int size);
  22. #endif /* defined(_SPARC_BITEXT_H) */