Lines Matching +full:2 +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" \
48 " casl %2,%1,%0\n" \
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" \
63 " casl %2,%1,%0\n" \
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; \
123 static inline void arch_atomic_inc(atomic_t *v) in arch_atomic_inc() argument
125 __asm__ __volatile__("addql #1,%0" : "+m" (*v)); in arch_atomic_inc()
129 static inline void arch_atomic_dec(atomic_t *v) in arch_atomic_dec() argument
131 __asm__ __volatile__("subql #1,%0" : "+m" (*v)); in arch_atomic_dec()
135 static inline int arch_atomic_dec_and_test(atomic_t *v) in arch_atomic_dec_and_test() argument
138 __asm__ __volatile__("subql #1,%1; seq %0" : "=d" (c), "+m" (*v)); in arch_atomic_dec_and_test()
143 static inline int arch_atomic_dec_and_test_lt(atomic_t *v) in arch_atomic_dec_and_test_lt() argument
148 : "=d" (c), "=m" (*v) in arch_atomic_dec_and_test_lt()
149 : "m" (*v)); in arch_atomic_dec_and_test_lt()
153 static inline int arch_atomic_inc_and_test(atomic_t *v) in arch_atomic_inc_and_test() argument
156 __asm__ __volatile__("addql #1,%1; seq %0" : "=d" (c), "+m" (*v)); in arch_atomic_inc_and_test()
163 #define arch_atomic_cmpxchg(v, o, n) ((int)arch_cmpxchg(&((v)->counter), (o), (n))) argument
164 #define arch_atomic_xchg(v, new) (arch_xchg(&((v)->counter), new)) argument
168 static inline int arch_atomic_cmpxchg(atomic_t *v, int old, int new) in arch_atomic_cmpxchg() argument
174 prev = arch_atomic_read(v); in arch_atomic_cmpxchg()
176 arch_atomic_set(v, new); in arch_atomic_cmpxchg()
181 static inline int arch_atomic_xchg(atomic_t *v, int new) in arch_atomic_xchg() argument
187 prev = arch_atomic_read(v); in arch_atomic_xchg()
188 arch_atomic_set(v, new); in arch_atomic_xchg()
195 static inline int arch_atomic_sub_and_test(int i, atomic_t *v) in arch_atomic_sub_and_test() argument
198 __asm__ __volatile__("subl %2,%1; seq %0" in arch_atomic_sub_and_test()
199 : "=d" (c), "+m" (*v) in arch_atomic_sub_and_test()
205 static inline int arch_atomic_add_negative(int i, atomic_t *v) in arch_atomic_add_negative() argument
208 __asm__ __volatile__("addl %2,%1; smi %0" in arch_atomic_add_negative()
209 : "=d" (c), "+m" (*v) in arch_atomic_add_negative()