Lines Matching +full:1 +full:v

19 #define arch_atomic_read(v)	READ_ONCE((v)->counter)  argument
20 #define arch_atomic_set(v, i) WRITE_ONCE(((v)->counter), (i)) argument
33 static inline void arch_atomic_##op(int i, atomic_t *v) \
35 __asm__ __volatile__(#asm_op "l %1,%0" : "+m" (*v) : ASM_DI (i));\
41 static inline int arch_atomic_##op##_return(int i, atomic_t *v) \
46 "1: movel %2,%1\n" \
47 " " #asm_op "l %3,%1\n" \
48 " casl %2,%1,%0\n" \
49 " jne 1b" \
50 : "+m" (*v), "=&d" (t), "=&d" (tmp) \
51 : "di" (i), "2" (arch_atomic_read(v))); \
56 static inline int arch_atomic_fetch_##op(int i, atomic_t *v) \
61 "1: movel %2,%1\n" \
62 " " #asm_op "l %3,%1\n" \
63 " casl %2,%1,%0\n" \
64 " jne 1b" \
65 : "+m" (*v), "=&d" (t), "=&d" (tmp) \
66 : "di" (i), "2" (arch_atomic_read(v))); \
73 static inline int arch_atomic_##op##_return(int i, atomic_t * v) \
79 t = (v->counter c_op i); \
86 static inline int arch_atomic_fetch_##op(int i, atomic_t * v) \
92 t = v->counter; \
93 v->counter c_op i; \
132 static inline void arch_atomic_inc(atomic_t *v) in arch_atomic_inc() argument
134 __asm__ __volatile__("addql #1,%0" : "+m" (*v)); in arch_atomic_inc()
138 static inline void arch_atomic_dec(atomic_t *v) in arch_atomic_dec() argument
140 __asm__ __volatile__("subql #1,%0" : "+m" (*v)); in arch_atomic_dec()
144 static inline int arch_atomic_dec_and_test(atomic_t *v) in arch_atomic_dec_and_test() argument
147 __asm__ __volatile__("subql #1,%1; seq %0" : "=d" (c), "+m" (*v)); in arch_atomic_dec_and_test()
152 static inline int arch_atomic_dec_and_test_lt(atomic_t *v) in arch_atomic_dec_and_test_lt() argument
156 "subql #1,%1; slt %0" in arch_atomic_dec_and_test_lt()
157 : "=d" (c), "=m" (*v) in arch_atomic_dec_and_test_lt()
158 : "m" (*v)); in arch_atomic_dec_and_test_lt()
162 static inline int arch_atomic_inc_and_test(atomic_t *v) in arch_atomic_inc_and_test() argument
165 __asm__ __volatile__("addql #1,%1; seq %0" : "=d" (c), "+m" (*v)); in arch_atomic_inc_and_test()
172 static inline int arch_atomic_cmpxchg(atomic_t *v, int old, int new) in arch_atomic_cmpxchg() argument
178 prev = arch_atomic_read(v); in arch_atomic_cmpxchg()
180 arch_atomic_set(v, new); in arch_atomic_cmpxchg()
186 static inline int arch_atomic_xchg(atomic_t *v, int new) in arch_atomic_xchg() argument
192 prev = arch_atomic_read(v); in arch_atomic_xchg()
193 arch_atomic_set(v, new); in arch_atomic_xchg()
201 static inline int arch_atomic_sub_and_test(int i, atomic_t *v) in arch_atomic_sub_and_test() argument
204 __asm__ __volatile__("subl %2,%1; seq %0" in arch_atomic_sub_and_test()
205 : "=d" (c), "+m" (*v) in arch_atomic_sub_and_test()
211 static inline int arch_atomic_add_negative(int i, atomic_t *v) in arch_atomic_add_negative() argument
214 __asm__ __volatile__("addl %2,%1; smi %0" in arch_atomic_add_negative()
215 : "=d" (c), "+m" (*v) in arch_atomic_add_negative()