20 Oct, 2007

1 commit

  • define first set of BIT* macros

    - move BITOP_MASK and BITOP_WORD from asm-generic/bitops/atomic.h to
    include/linux/bitops.h and rename it to BIT_MASK and BIT_WORD
    - move BITS_TO_LONGS and BITS_PER_BYTE to bitops.h too and allow easily
    define another BITS_TO_something (e.g. in event.c) by BITS_TO_TYPE macro
    Remaining (and common) BIT macro will be defined after all occurences and
    conflicts will be sorted out in the patches.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

27 Mar, 2006

1 commit

  • 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
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita