mirror of
https://github.com/reactos/reactos.git
synced 2025-01-06 06:20:13 +00:00
1e3d5d70e9
svn path=/trunk/; revision=26033
30 lines
1,010 B
C
30 lines
1,010 B
C
#ifndef _I386_BITOPS_H
|
|
#define _I386_BITOPS_H
|
|
|
|
/*
|
|
* Copyright 1992, Linus Torvalds.
|
|
*/
|
|
|
|
/*
|
|
* These have to be done with inline assembly: that way the bit-setting
|
|
* is guaranteed to be atomic. All bit operations return 0 if the bit
|
|
* was cleared before the operation and != 0 if it was not.
|
|
*
|
|
* bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
|
|
*/
|
|
|
|
/*
|
|
* Function prototypes to keep gcc -Wall happy
|
|
*/
|
|
extern void set_bit(int nr, volatile void * addr);
|
|
extern void clear_bit(int nr, volatile void * addr);
|
|
extern void change_bit(int nr, volatile void * addr);
|
|
extern int test_and_set_bit(int nr, volatile void * addr);
|
|
extern int test_and_clear_bit(int nr, volatile void * addr);
|
|
extern int test_and_change_bit(int nr, volatile void * addr);
|
|
extern int test_bit(int nr, volatile void * addr);
|
|
extern int find_first_zero_bit(void * addr, unsigned size);
|
|
extern int find_next_zero_bit (void * addr, int size, int offset);
|
|
extern unsigned long ffz(unsigned long word);
|
|
|
|
#endif /* _I386_BITOPS_H */
|