* Copyright 1992, Linus Torvalds.
*/
-#include <linux/config.h>
/*
* These have to be done with inline assembly: that way the bit-setting
* @nr: Bit to set
* @addr: Address to count from
*
- * This operation is atomic and cannot be reordered.
+ * This operation is atomic and cannot be reordered.
* It also implies a memory barrier.
*/
static __inline__ int test_and_set_bit(int nr, volatile void * addr)
* @nr: Bit to set
* @addr: Address to count from
*
- * This operation is non-atomic and can be reordered.
+ * This operation is non-atomic and can be reordered.
* If two examples of this operation race, one can appear to succeed
* but actually fail. You must protect multiple accesses with a lock.
*/
* @nr: Bit to set
* @addr: Address to count from
*
- * This operation is atomic and cannot be reordered.
+ * This operation is atomic and cannot be reordered.
* It also implies a memory barrier.
*/
static __inline__ int test_and_clear_bit(int nr, volatile void * addr)
* @nr: Bit to set
* @addr: Address to count from
*
- * This operation is non-atomic and can be reordered.
+ * This operation is non-atomic and can be reordered.
* If two examples of this operation race, one can appear to succeed
* but actually fail. You must protect multiple accesses with a lock.
*/
* @nr: Bit to set
* @addr: Address to count from
*
- * This operation is atomic and cannot be reordered.
+ * This operation is atomic and cannot be reordered.
* It also implies a memory barrier.
*/
static __inline__ int test_and_change_bit(int nr, volatile void * addr)
{
unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
int set = 0, bit = offset & 31, res;
-
+
if (bit) {
/*
* Look for zero in first byte
"1:" : "=r" (r) : "g" (x));
return r+1;
}
+#define PLATFORM_FFS
/**
* hweightN - returns the hamming weight of a N-bit word