5 * Copyright 1992, Linus Torvalds.
9 * These have to be done with inline assembly: that way the bit-setting
10 * is guaranteed to be atomic. All bit operations return 0 if the bit
11 * was cleared before the operation and != 0 if it was not.
13 * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
17 * Function prototypes to keep gcc -Wall happy
19 extern void set_bit(int nr
, volatile void * addr
);
20 extern void clear_bit(int nr
, volatile void * addr
);
21 extern void change_bit(int nr
, volatile void * addr
);
22 extern int test_and_set_bit(int nr
, volatile void * addr
);
23 extern int test_and_clear_bit(int nr
, volatile void * addr
);
24 extern int test_and_change_bit(int nr
, volatile void * addr
);
25 extern int test_bit(int nr
, volatile void * addr
);
26 extern int find_first_zero_bit(void * addr
, unsigned size
);
27 extern int find_next_zero_bit (void * addr
, int size
, int offset
);
28 extern unsigned long ffz(unsigned long word
);
30 #endif /* _I386_BITOPS_H */