/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (c) 1994-1997, 99, 2000, 06, 07 Ralf Baechle (ralf@linux-mips.org) * Copyright (c) 1999, 2000 Silicon Graphics, Inc.
*/ #include <linux/bitops.h> #include <linux/bits.h> #include <linux/irqflags.h> #include <linux/export.h>
/** * __mips_set_bit - Atomically set a bit in memory. This is called by * set_bit() if it cannot find a faster solution. * @nr: the bit to set * @addr: the address to start counting from
*/ void __mips_set_bit(unsignedlong nr, volatileunsignedlong *addr)
{ volatileunsignedlong *a = &addr[BIT_WORD(nr)]; unsignedint bit = nr % BITS_PER_LONG; unsignedlong mask; unsignedlong flags;
/** * __mips_clear_bit - Clears a bit in memory. This is called by clear_bit() if * it cannot find a faster solution. * @nr: Bit to clear * @addr: Address to start counting from
*/ void __mips_clear_bit(unsignedlong nr, volatileunsignedlong *addr)
{ volatileunsignedlong *a = &addr[BIT_WORD(nr)]; unsignedint bit = nr % BITS_PER_LONG; unsignedlong mask; unsignedlong flags;
/** * __mips_change_bit - Toggle a bit in memory. This is called by change_bit() * if it cannot find a faster solution. * @nr: Bit to change * @addr: Address to start counting from
*/ void __mips_change_bit(unsignedlong nr, volatileunsignedlong *addr)
{ volatileunsignedlong *a = &addr[BIT_WORD(nr)]; unsignedint bit = nr % BITS_PER_LONG; unsignedlong mask; unsignedlong flags;
/** * __mips_test_and_set_bit_lock - Set a bit and return its old value. This is * called by test_and_set_bit_lock() if it cannot find a faster solution. * @nr: Bit to set * @addr: Address to count from
*/ int __mips_test_and_set_bit_lock(unsignedlong nr, volatileunsignedlong *addr)
{ volatileunsignedlong *a = &addr[BIT_WORD(nr)]; unsignedint bit = nr % BITS_PER_LONG; unsignedlong mask; unsignedlong flags; int res;
/** * __mips_test_and_clear_bit - Clear a bit and return its old value. This is * called by test_and_clear_bit() if it cannot find a faster solution. * @nr: Bit to clear * @addr: Address to count from
*/ int __mips_test_and_clear_bit(unsignedlong nr, volatileunsignedlong *addr)
{ volatileunsignedlong *a = &addr[BIT_WORD(nr)]; unsignedint bit = nr % BITS_PER_LONG; unsignedlong mask; unsignedlong flags; int res;
/** * __mips_test_and_change_bit - Change a bit and return its old value. This is * called by test_and_change_bit() if it cannot find a faster solution. * @nr: Bit to change * @addr: Address to count from
*/ int __mips_test_and_change_bit(unsignedlong nr, volatileunsignedlong *addr)
{ volatileunsignedlong *a = &addr[BIT_WORD(nr)]; unsignedint bit = nr % BITS_PER_LONG; unsignedlong mask; unsignedlong flags; int res;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.