File: bitops.h

package info (click to toggle)
libaal 1.0.7-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 1,768 kB
  • sloc: sh: 4,118; ansic: 2,461; makefile: 52
file content (37 lines) | stat: -rw-r--r-- 923 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* Copyright (C) 2001, 2002, 2003 by Hans Reiser, licensing governed by
   libaal/COPYING.
   
   bitops.h -- bitops functions. */

#ifndef AAL_BITOPS_H
#define AAL_BITOPS_H

#ifndef ENABLE_MINIMAL
typedef uint64_t bit_t;

extern int aal_set_bit(void *map, bit_t nr);
extern int aal_clear_bit(void *map, bit_t nr);
extern int aal_test_bit(void *map, bit_t nr);

extern bit_t aal_find_first_zero_bit(void *map, bit_t size);

extern bit_t aal_find_next_zero_bit(void *map, bit_t size,
				    bit_t offset);

extern bit_t aal_find_next_set_bit(void *map, bit_t size,
				   bit_t offset);

extern bit_t aal_find_zero_bits(void *map, bit_t size,
				bit_t *start, bit_t count);

extern bit_t aal_find_set_bits(void *map, bit_t size,
			       bit_t *start, bit_t count);

extern void aal_clear_bits(void *map, bit_t start,
			   bit_t count);

extern void aal_set_bits(void *map, bit_t start,
			 bit_t count);
#endif

#endif