• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/x86/include/asm/

Lines Matching defs:nr

40 #define IS_IMMEDIATE(nr)		(__builtin_constant_p(nr))
41 #define CONST_MASK_ADDR(nr, addr) BITOP_ADDR((void *)(addr) + ((nr)>>3))
42 #define CONST_MASK(nr) (1 << ((nr) & 7))
46 * @nr: the bit to set
56 * Note that @nr may be almost arbitrarily large; this function is not
60 set_bit(unsigned int nr, volatile unsigned long *addr)
62 if (IS_IMMEDIATE(nr)) {
64 : CONST_MASK_ADDR(nr, addr)
65 : "iq" ((u8)CONST_MASK(nr))
69 : BITOP_ADDR(addr) : "Ir" (nr) : "memory");
75 * @nr: the bit to set
82 static inline void __set_bit(int nr, volatile unsigned long *addr)
84 asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory");
89 * @nr: Bit to clear
98 clear_bit(int nr, volatile unsigned long *addr)
100 if (IS_IMMEDIATE(nr)) {
102 : CONST_MASK_ADDR(nr, addr)
103 : "iq" ((u8)~CONST_MASK(nr)));
107 : "Ir" (nr));
113 * @nr: Bit to clear
119 static inline void clear_bit_unlock(unsigned nr, volatile unsigned long *addr)
122 clear_bit(nr, addr);
125 static inline void __clear_bit(int nr, volatile unsigned long *addr)
127 asm volatile("btr %1,%0" : ADDR : "Ir" (nr));
132 * @nr: Bit to clear
142 static inline void __clear_bit_unlock(unsigned nr, volatile unsigned long *addr)
145 __clear_bit(nr, addr);
153 * @nr: the bit to change
160 static inline void __change_bit(int nr, volatile unsigned long *addr)
162 asm volatile("btc %1,%0" : ADDR : "Ir" (nr));
167 * @nr: Bit to change
171 * Note that @nr may be almost arbitrarily large; this function is not
174 static inline void change_bit(int nr, volatile unsigned long *addr)
176 if (IS_IMMEDIATE(nr)) {
178 : CONST_MASK_ADDR(nr, addr)
179 : "iq" ((u8)CONST_MASK(nr)));
183 : "Ir" (nr));
189 * @nr: Bit to set
195 static inline int test_and_set_bit(int nr, volatile unsigned long *addr)
200 "sbb %0,%0" : "=r" (oldbit), ADDR : "Ir" (nr) : "memory");
207 * @nr: Bit to set
213 test_and_set_bit_lock(int nr, volatile unsigned long *addr)
215 return test_and_set_bit(nr, addr);
220 * @nr: Bit to set
227 static inline int __test_and_set_bit(int nr, volatile unsigned long *addr)
234 : "Ir" (nr));
240 * @nr: Bit to clear
246 static inline int test_and_clear_bit(int nr, volatile unsigned long *addr)
252 : "=r" (oldbit), ADDR : "Ir" (nr) : "memory");
259 * @nr: Bit to clear
266 static inline int __test_and_clear_bit(int nr, volatile unsigned long *addr)
273 : "Ir" (nr));
278 static inline int __test_and_change_bit(int nr, volatile unsigned long *addr)
285 : "Ir" (nr) : "memory");
292 * @nr: Bit to change
298 static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
304 : "=r" (oldbit), ADDR : "Ir" (nr) : "memory");
309 static __always_inline int constant_test_bit(unsigned int nr, const volatile unsigned long *addr)
311 return ((1UL << (nr % BITS_PER_LONG)) &
312 (addr[nr / BITS_PER_LONG])) != 0;
315 static inline int variable_test_bit(int nr, volatile const unsigned long *addr)
322 : "m" (*(unsigned long *)addr), "Ir" (nr));
328 #define test_bit(nr, addr) \
329 (__builtin_constant_p((nr)) \
330 ? constant_test_bit((nr), (addr)) \
331 : variable_test_bit((nr), (addr)))
451 #define ext2_set_bit_atomic(lock, nr, addr) \
452 test_and_set_bit((nr), (unsigned long *)(addr))
453 #define ext2_clear_bit_atomic(lock, nr, addr) \
454 test_and_clear_bit((nr), (unsigned long *)(addr))