[PATCH] bitops: generic __{,test_and_}{set,clear,change}_bit() and test_bit()
authorAkinobu Mita <mita@miraclelinux.com>
Sun, 26 Mar 2006 09:39:07 +0000 (01:39 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 26 Mar 2006 16:57:10 +0000 (08:57 -0800)
commit4117b02132d1cf96a3e1c57148e302c4801c974d
treebbab0444010b7e549ecb3bec2ac28624bd9b0393
parent7a8a2429956fcfa3f3ef8fc105a4c055d70239ab
[PATCH] bitops: generic __{,test_and_}{set,clear,change}_bit() and test_bit()

This patch introduces the C-language equivalents of the functions below:

void __set_bit(int nr, volatile unsigned long *addr);
void __clear_bit(int nr, volatile unsigned long *addr);
void __change_bit(int nr, volatile unsigned long *addr);
int __test_and_set_bit(int nr, volatile unsigned long *addr);
int __test_and_clear_bit(int nr, volatile unsigned long *addr);
int __test_and_change_bit(int nr, volatile unsigned long *addr);
int test_bit(int nr, const volatile unsigned long *addr);

In include/asm-generic/bitops/non-atomic.h

This code largely copied from: asm-powerpc/bitops.h

Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-generic/bitops/non-atomic.h [new file with mode: 0644]