Go to the source code of this file.
Functions | |
| __inline__ int | set_bit (int nr, int *addr) |
| __inline__ int | clear_bit (int nr, int *addr) |
| __inline__ int | test_bit (int nr, int *addr) |
| __inline__ int clear_bit | ( | int | nr, | |
| int * | addr | |||
| ) |
| __inline__ int set_bit | ( | int | nr, | |
| int * | addr | |||
| ) |
For the benefit of those who are trying to port Linux to another architecture, here are some C-language equivalents. You should recode these in the native assmebly language, if at all possible. To guarantee atomicity, these routines call cli() and sti() to disable interrupts while they operate. (You have to provide inline routines to cli() and sti().)
Also note, these routines assume that you have 32 bit integers. You will have to change this if you are trying to port Linux to the Alpha architecture or to a Cray. :-)
C language equivalents written by Theodore Ts'o, 9/26/92
1.4.6-5