@@ -117,6 +117,26 @@ clear_bit_unlock (int nr, volatile void *addr)
} while (cmpxchg_rel(m, old, new) != old);
}
+static inline bool clear_bit_unlock_is_negative_byte(unsigned int nr,
+ volatile unsigned long *p)
+{
+ __u32 mask, old, new;
+ volatile __u32 *m;
+ CMPXCHG_BUGCHECK_DECL
+
+ m = (volatile __u32 *) addr + (nr >> 5);
+ mask = ~(1 << (nr & 31));
+ do {
+ CMPXCHG_BUGCHECK(m);
+ old = *m;
+ new = old & mask;
+ } while (cmpxchg_rel(m, old, new) != old);
+
+ return old & (1 << 7);
+}
+#define clear_bit_unlock_is_negative_byte \
+ clear_bit_unlock_is_negative_byte
+
/**
* __clear_bit_unlock - Non-atomically clears a bit in memory with release
* @nr: Bit to clear