/linux/arch/ia64/include/asm/ |
A D | futex.h | 9 #define __futex_atomic_op1(insn, ret, oldval, uaddr, oparg) \ argument 17 : "+r" (r8), "=r" (oldval) \ 23 #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ argument 38 : "+r" (r8), "=r" (val), "=&r" (oldval), \ 44 } while (unlikely (val != oldval)); \ 51 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 58 __futex_atomic_op1("xchg4 %1=[%2],%3", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 68 __futex_atomic_op2("and %3=%3,%5", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 79 *oval = oldval; in arch_futex_atomic_op_inuser() 86 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/linux/arch/arm/include/asm/ |
A D | futex.h | 25 #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ argument 39 : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \ 47 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument 70 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) in futex_atomic_cmpxchg_inatomic() 84 #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ argument 93 : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \ 101 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument 120 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) in futex_atomic_cmpxchg_inatomic() 135 int oldval = 0, ret, tmp; in arch_futex_atomic_op_inuser() local 146 __futex_atomic_op("mov %0, %4", ret, oldval, tmp, uaddr, oparg); in arch_futex_atomic_op_inuser() [all …]
|
A D | cmpxchg.h | 159 unsigned long oldval, res; in __cmpxchg() local 172 : "=&r" (res), "=&r" (oldval) in __cmpxchg() 184 : "=&r" (res), "=&r" (oldval) in __cmpxchg() 197 : "=&r" (res), "=&r" (oldval) in __cmpxchg() 204 oldval = 0; in __cmpxchg() 207 return oldval; in __cmpxchg() 248 unsigned long long oldval; in __cmpxchg64() local 262 : "=&r" (res), "=&r" (oldval), "+Qo" (*ptr) in __cmpxchg64() 266 return oldval; in __cmpxchg64()
|
A D | atomic.h | 108 int oldval; in arch_atomic_cmpxchg_relaxed() local 124 return oldval; in arch_atomic_cmpxchg_relaxed() 130 int oldval, newval; in arch_atomic_fetch_add_unless() local 149 if (oldval != u) in arch_atomic_fetch_add_unless() 152 return oldval; in arch_atomic_fetch_add_unless() 406 s64 oldval; in ATOMIC64_OPS() local 418 : "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter) in ATOMIC64_OPS() 423 return oldval; in ATOMIC64_OPS() 477 s64 oldval, newval; in arch_atomic64_fetch_add_unless() local 498 if (oldval != u) in arch_atomic64_fetch_add_unless() [all …]
|
/linux/arch/s390/include/asm/ |
A D | futex.h | 20 : "=d" (ret), "=&d" (oldval), "=&d" (newval), \ 28 int oldval = 0, newval, ret; in arch_futex_atomic_op_inuser() local 33 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 37 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 41 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 45 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 49 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 56 *oval = oldval; in arch_futex_atomic_op_inuser() 62 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument 72 : "=d" (ret), "+d" (oldval), "=m" (*uaddr) in futex_atomic_cmpxchg_inatomic() [all …]
|
/linux/arch/mips/include/asm/ |
A D | futex.h | 22 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 48 : "=r" (ret), "=&r" (oldval), \ 78 : "=r" (ret), "=&r" (oldval), \ 90 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 97 __futex_atomic_op("move $1, %z5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 102 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 106 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 110 ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 114 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 121 *oval = oldval; in arch_futex_atomic_op_inuser() [all …]
|
/linux/arch/sh/include/asm/ |
A D | futex.h | 21 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument 26 return atomic_futex_op_cmpxchg_inatomic(uval, uaddr, oldval, newval); in futex_atomic_cmpxchg_inatomic() 32 u32 oldval, newval, prev; in arch_futex_atomic_op_inuser() local 36 ret = get_user(oldval, uaddr); in arch_futex_atomic_op_inuser() 45 newval = oldval + oparg; in arch_futex_atomic_op_inuser() 48 newval = oldval | oparg; in arch_futex_atomic_op_inuser() 51 newval = oldval & ~oparg; in arch_futex_atomic_op_inuser() 54 newval = oldval ^ oparg; in arch_futex_atomic_op_inuser() 63 ret = futex_atomic_cmpxchg_inatomic(&prev, uaddr, oldval, newval); in arch_futex_atomic_op_inuser() 64 } while (!ret && prev != oldval); in arch_futex_atomic_op_inuser() [all …]
|
A D | spinlock-llsc.h | 29 unsigned long oldval; in arch_spin_lock() local 40 : "=&z" (tmp), "=&r" (oldval) in arch_spin_lock() 63 unsigned long tmp, oldval; in arch_spin_trylock() local 73 : "=&z" (tmp), "=&r" (oldval) in arch_spin_trylock() 78 return oldval; in arch_spin_trylock() 154 unsigned long tmp, oldval; in arch_read_trylock() local 167 : "=&z" (tmp), "=&r" (oldval) in arch_read_trylock() 172 return (oldval > 0); in arch_read_trylock() 177 unsigned long tmp, oldval; in arch_write_trylock() local 190 : "=&z" (tmp), "=&r" (oldval) in arch_write_trylock() [all …]
|
/linux/arch/sparc/include/asm/ |
A D | futex_64.h | 9 #define __futex_cas_op(insn, ret, oldval, uaddr, oparg) \ argument 29 : "=&r" (ret), "=&r" (oldval), "=&r" (tem) \ 36 int oldval = 0, ret, tem; in arch_futex_atomic_op_inuser() local 43 __futex_cas_op("mov\t%4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 46 __futex_cas_op("add\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 49 __futex_cas_op("or\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 52 __futex_cas_op("andn\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 55 __futex_cas_op("xor\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 62 *oval = oldval; in arch_futex_atomic_op_inuser() 69 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/linux/arch/openrisc/include/asm/ |
A D | futex.h | 11 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 27 : "=&r" (oldval), "=&r" (ret), "+m" (*uaddr) \ 36 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 43 __futex_atomic_op("l.or %1,%4,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 46 __futex_atomic_op("l.add %1,%0,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 49 __futex_atomic_op("l.or %1,%0,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 52 __futex_atomic_op("l.and %1,%0,%4", ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 55 __futex_atomic_op("l.xor %1,%0,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 62 *oval = oldval; in arch_futex_atomic_op_inuser() 69 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/linux/arch/hexagon/include/asm/ |
A D | futex.h | 13 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 29 : "=&r" (oldval), "=&r" (ret), "+m" (*uaddr) \ 37 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 44 __futex_atomic_op("%1 = %4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 47 __futex_atomic_op("%1 = add(%0,%4)\n", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 51 __futex_atomic_op("%1 = or(%0,%4)\n", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 56 oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 59 __futex_atomic_op("%1 = xor(%0,%4)\n", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 67 *oval = oldval; in arch_futex_atomic_op_inuser() 73 futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval, in futex_atomic_cmpxchg_inatomic() argument [all …]
|
A D | bitops.h | 33 int oldval; in test_and_clear_bit() local 42 : "=&r" (oldval) in test_and_clear_bit() 47 return oldval; in test_and_clear_bit() 57 int oldval; in test_and_set_bit() local 66 : "=&r" (oldval) in test_and_set_bit() 72 return oldval; in test_and_set_bit() 83 int oldval; in test_and_change_bit() local 92 : "=&r" (oldval) in test_and_change_bit() 97 return oldval; in test_and_change_bit()
|
/linux/arch/microblaze/include/asm/ |
A D | futex.h | 11 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 27 : "=&r" (oldval), "=&r" (ret) \ 35 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 42 __futex_atomic_op("or %1,%4,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 45 __futex_atomic_op("add %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 48 __futex_atomic_op("or %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 51 __futex_atomic_op("andn %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 54 __futex_atomic_op("xor %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 61 *oval = oldval; in arch_futex_atomic_op_inuser() 68 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/linux/arch/xtensa/include/asm/ |
A D | futex.h | 39 : [oldval] "=&r" (old), [newval] "=&r" (ret) \ 63 : [oldval] "=&r" (old), [newval] "=&r" (ret), \ 73 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 81 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 85 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 89 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 93 ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 97 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 104 *oval = oldval; in arch_futex_atomic_op_inuser() 114 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/linux/arch/nds32/include/asm/ |
A D | futex.h | 22 #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ argument 33 : "=&r" (ret), "=&r" (oldval) \ 38 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument 56 :"r"(oldval), "r"(newval), "r"(uaddr), "i"(-EFAULT) in futex_atomic_cmpxchg_inatomic() 67 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 73 __futex_atomic_op("move %0, %3", ret, oldval, tmp, uaddr, in arch_futex_atomic_op_inuser() 77 __futex_atomic_op("add %0, %1, %3", ret, oldval, tmp, uaddr, in arch_futex_atomic_op_inuser() 81 __futex_atomic_op("or %0, %1, %3", ret, oldval, tmp, uaddr, in arch_futex_atomic_op_inuser() 85 __futex_atomic_op("and %0, %1, %3", ret, oldval, tmp, uaddr, in arch_futex_atomic_op_inuser() 89 __futex_atomic_op("xor %0, %1, %3", ret, oldval, tmp, uaddr, in arch_futex_atomic_op_inuser() [all …]
|
/linux/arch/alpha/include/asm/ |
A D | futex.h | 12 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 25 : "=&r" (oldval), "=&r"(ret) \ 32 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 39 __futex_atomic_op("mov %3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 42 __futex_atomic_op("addl %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 45 __futex_atomic_op("or %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 48 __futex_atomic_op("andnot %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 51 __futex_atomic_op("xor %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 58 *oval = oldval; in arch_futex_atomic_op_inuser() 65 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/linux/arch/csky/include/asm/ |
A D | futex.h | 14 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 33 : [r] "+r" (ret), [ov] "=&r" (oldval), \ 44 int oldval = 0, ret = 0; in arch_futex_atomic_op_inuser() local 52 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 56 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 60 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 64 ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 68 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 75 *oval = oldval; in arch_futex_atomic_op_inuser() 84 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/linux/arch/powerpc/include/asm/ |
A D | futex.h | 12 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 27 : "=&r" (oldval), "=&r" (ret) \ 34 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 41 __futex_atomic_op("mr %1,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 44 __futex_atomic_op("add %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 47 __futex_atomic_op("or %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 50 __futex_atomic_op("andc %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 53 __futex_atomic_op("xor %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 60 *oval = oldval; in arch_futex_atomic_op_inuser() 67 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/linux/arch/riscv/include/asm/ |
A D | futex.h | 21 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 37 : [r] "+r" (ret), [ov] "=&r" (oldval), \ 47 int oldval = 0, ret = 0; in arch_futex_atomic_op_inuser() local 55 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 59 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 63 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 67 ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 71 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 78 *oval = oldval; in arch_futex_atomic_op_inuser() 85 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/linux/arch/arc/include/asm/ |
A D | futex.h | 18 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\ argument 39 : "=&r" (ret), "=&r" (oldval) \ 46 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\ argument 66 : "=&r" (ret), "=&r" (oldval) \ 76 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 87 __futex_atomic_op("mov %0, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 91 __futex_atomic_op("add %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 94 __futex_atomic_op("or %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 97 __futex_atomic_op("bic %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 100 __futex_atomic_op("xor %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() [all …]
|
/linux/arch/arm64/include/asm/ |
A D | futex.h | 15 #define __futex_atomic_op(insn, ret, oldval, uaddr, tmp, oparg) \ argument 33 : "=&r" (ret), "=&r" (oldval), "+Q" (*uaddr), "=&r" (tmp), \ 43 int oldval = 0, ret, tmp; in arch_futex_atomic_op_inuser() local 52 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser() 56 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser() 60 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser() 64 ret, oldval, uaddr, tmp, ~oparg); in arch_futex_atomic_op_inuser() 68 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser() 75 *oval = oldval; in arch_futex_atomic_op_inuser() 82 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/linux/arch/x86/include/asm/ |
A D | futex.h | 17 int oldval = 0, ret; \ 25 : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \ 29 *oval = oldval; \ 35 int oldval = 0, ret, tem; \ 48 : "=&a" (oldval), "=&r" (ret), \ 53 *oval = oldval; \ 91 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument 105 : "+r" (ret), "=a" (oldval), "+m" (*uaddr) in futex_atomic_cmpxchg_inatomic() 106 : "i" (-EFAULT), "r" (newval), "1" (oldval) in futex_atomic_cmpxchg_inatomic() 110 *uval = oldval; in futex_atomic_cmpxchg_inatomic()
|
/linux/include/asm-generic/ |
A D | futex.h | 33 int oldval, ret; in arch_futex_atomic_op_inuser() local 39 if (unlikely(get_user(oldval, uaddr) != 0)) in arch_futex_atomic_op_inuser() 43 tmp = oldval; in arch_futex_atomic_op_inuser() 72 *oval = oldval; in arch_futex_atomic_op_inuser() 94 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument 104 if (val == oldval && unlikely(put_user(newval, uaddr) != 0)) { in futex_atomic_cmpxchg_inatomic() 124 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
|
/linux/arch/parisc/include/asm/ |
A D | futex.h | 36 int oldval, ret; in arch_futex_atomic_op_inuser() local 42 if (unlikely(get_user(oldval, uaddr) != 0)) in arch_futex_atomic_op_inuser() 46 tmp = oldval; in arch_futex_atomic_op_inuser() 75 *oval = oldval; in arch_futex_atomic_op_inuser() 82 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument 107 if (val == oldval && unlikely(put_user(newval, uaddr) != 0)) { in futex_atomic_cmpxchg_inatomic()
|
/linux/Documentation/translations/zh_CN/arm/ |
A D | kernel_user_helpers.txt | 136 int __kuser_cmpxchg(int32_t oldval, int32_t newval, volatile int32_t *ptr); 140 r0 = oldval 156 仅在 *ptr 为 oldval 时原子保存 newval 于 *ptr 中。 163 typedef int (__kuser_cmpxchg_t)(int oldval, int newval, volatile int *ptr); 228 int __kuser_cmpxchg64(const int64_t *oldval, 234 r0 = 指向 oldval 250 仅在 *ptr 等于 *oldval 指向的 64 位值时,原子保存 *newval 259 typedef int (__kuser_cmpxchg64_t)(const int64_t *oldval,
|