/arch/frv/kernel/ |
D | futex.c | 23 int oldval, ret; in atomic_futex_op_xchg_set() local 44 : "+U"(*uaddr), "=&r"(oldval), "=&r"(ret), "=r"(oparg) in atomic_futex_op_xchg_set() 49 *_oldval = oldval; in atomic_futex_op_xchg_set() 55 int oldval, ret; in atomic_futex_op_xchg_add() local 77 : "+U"(*uaddr), "=&r"(oldval), "=&r"(ret), "=r"(oparg) in atomic_futex_op_xchg_add() 82 *_oldval = oldval; in atomic_futex_op_xchg_add() 88 int oldval, ret; in atomic_futex_op_xchg_or() local 110 : "+U"(*uaddr), "=&r"(oldval), "=&r"(ret), "=r"(oparg) in atomic_futex_op_xchg_or() 115 *_oldval = oldval; in atomic_futex_op_xchg_or() 121 int oldval, ret; in atomic_futex_op_xchg_and() local [all …]
|
/arch/tile/include/asm/ |
D | atomic_64.h | 79 int guess, oldval = v->counter; in ATOMIC_OPS() local 82 guess = oldval; in ATOMIC_OPS() 84 oldval = __insn_cmpexch4(&v->counter, guess ^ i); in ATOMIC_OPS() 85 } while (guess != oldval); in ATOMIC_OPS() 87 return oldval; in ATOMIC_OPS() 92 int guess, oldval = v->counter; in atomic_xor() local 94 guess = oldval; in atomic_xor() 96 oldval = __insn_cmpexch4(&v->counter, guess ^ i); in atomic_xor() 97 } while (guess != oldval); in atomic_xor() 102 int guess, oldval = v->counter; in __atomic_add_unless() local [all …]
|
D | bitops_64.h | 38 unsigned long guess, oldval; in change_bit() local 40 oldval = *addr; in change_bit() 42 guess = oldval; in change_bit() 43 oldval = cmpxchg(addr, guess, guess ^ mask); in change_bit() 44 } while (guess != oldval); in change_bit() 83 unsigned long guess, oldval; in test_and_change_bit() local 85 oldval = *addr; in test_and_change_bit() 87 guess = oldval; in test_and_change_bit() 88 oldval = cmpxchg(addr, guess, guess ^ mask); in test_and_change_bit() 89 } while (guess != oldval); in test_and_change_bit() [all …]
|
D | futex.h | 58 ({ __insn_mtspr(SPR_CMPEXCH_VALUE, oldval); __futex_asm(cmpexch4); }) 62 u32 oldval, n = oparg; \ 63 if ((ret = __get_user(oldval, uaddr)) == 0) { \ 65 oparg = oldval ^ n; \ 67 } while (ret == 0 && oldval != val); \ 92 lock, oldval, oparg); \ 149 u32 oldval, u32 oparg) in futex_atomic_cmpxchg_inatomic() argument
|
/arch/mn10300/include/asm/ |
D | cmpxchg.h | 22 unsigned long oldval; in __xchg() local 32 : "=&r"(status), "=&r"(oldval), "=m"(*m) in __xchg() 36 return oldval; in __xchg() 43 unsigned long oldval; in __cmpxchg() local 55 : "=&r"(status), "=&r"(oldval), "=m"(*m) in __cmpxchg() 60 return oldval; in __cmpxchg() 77 unsigned long oldval; in __xchg() local 81 oldval = *m; in __xchg() 84 return oldval; in __xchg() 93 unsigned long oldval; in __cmpxchg() local [all …]
|
/arch/ia64/include/asm/ |
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 57 __futex_atomic_op1("xchg4 %1=[%2],%3", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 61 __futex_atomic_op2("add %3=%3,%5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 64 __futex_atomic_op2("or %3=%3,%5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 67 __futex_atomic_op2("and %3=%3,%5", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() [all …]
|
/arch/x86/include/asm/ |
D | futex.h | 15 #define __futex_atomic_op1(insn, ret, oldval, uaddr, oparg) \ argument 24 : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \ 27 #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ argument 41 : "=&a" (oldval), "=&r" (ret), \ 48 int oldval = 0, ret, tem; in arch_futex_atomic_op_inuser() local 54 __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 57 __futex_atomic_op1(LOCK_PREFIX "xaddl %0, %2", ret, oldval, in arch_futex_atomic_op_inuser() 61 __futex_atomic_op2("orl %4, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 64 __futex_atomic_op2("andl %4, %3", ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 67 __futex_atomic_op2("xorl %4, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() [all …]
|
/arch/sh/include/asm/ |
D | futex.h | 23 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument 28 return atomic_futex_op_cmpxchg_inatomic(uval, uaddr, oldval, newval); in futex_atomic_cmpxchg_inatomic() 34 u32 oldval, newval, prev; in arch_futex_atomic_op_inuser() local 41 ret = oldval = 0; in arch_futex_atomic_op_inuser() 43 ret = get_user(oldval, uaddr); in arch_futex_atomic_op_inuser() 52 newval = oldval + oparg; in arch_futex_atomic_op_inuser() 55 newval = oldval | oparg; in arch_futex_atomic_op_inuser() 58 newval = oldval & ~oparg; in arch_futex_atomic_op_inuser() 61 newval = oldval ^ oparg; in arch_futex_atomic_op_inuser() 70 ret = futex_atomic_cmpxchg_inatomic(&prev, uaddr, oldval, newval); in arch_futex_atomic_op_inuser() [all …]
|
D | spinlock-llsc.h | 33 unsigned long oldval; in arch_spin_lock() local 44 : "=&z" (tmp), "=&r" (oldval) in arch_spin_lock() 65 unsigned long tmp, oldval; in arch_spin_trylock() local 75 : "=&z" (tmp), "=&r" (oldval) in arch_spin_trylock() 80 return oldval; in arch_spin_trylock() 168 unsigned long tmp, oldval; in arch_read_trylock() local 181 : "=&z" (tmp), "=&r" (oldval) in arch_read_trylock() 186 return (oldval > 0); in arch_read_trylock() 191 unsigned long tmp, oldval; in arch_write_trylock() local 204 : "=&z" (tmp), "=&r" (oldval) in arch_write_trylock() [all …]
|
/arch/s390/include/asm/ |
D | futex.h | 10 #define __futex_atomic_op(insn, ret, oldval, newval, uaddr, oparg) \ argument 20 : "=d" (ret), "=&d" (oldval), "=&d" (newval), \ 28 int oldval = 0, newval, ret; in arch_futex_atomic_op_inuser() local 36 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 40 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 44 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 48 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 52 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 60 *oval = oldval; in arch_futex_atomic_op_inuser() 66 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/arch/openrisc/include/asm/ |
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 42 __futex_atomic_op("l.or %1,%4,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 45 __futex_atomic_op("l.add %1,%0,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 48 __futex_atomic_op("l.or %1,%0,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 51 __futex_atomic_op("l.and %1,%0,%4", ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 54 __futex_atomic_op("l.xor %1,%0,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 63 *oval = oldval; in arch_futex_atomic_op_inuser() 70 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/arch/hexagon/include/asm/ |
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 43 __futex_atomic_op("%1 = %4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 46 __futex_atomic_op("%1 = add(%0,%4)\n", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 50 __futex_atomic_op("%1 = or(%0,%4)\n", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 55 oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 58 __futex_atomic_op("%1 = xor(%0,%4)\n", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 68 *oval = oldval; in arch_futex_atomic_op_inuser() 74 futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval, in futex_atomic_cmpxchg_inatomic() argument [all …]
|
D | bitops.h | 47 int oldval; in test_and_clear_bit() local 56 : "=&r" (oldval) in test_and_clear_bit() 61 return oldval; in test_and_clear_bit() 71 int oldval; in test_and_set_bit() local 80 : "=&r" (oldval) in test_and_set_bit() 86 return oldval; in test_and_set_bit() 97 int oldval; in test_and_change_bit() local 106 : "=&r" (oldval) in test_and_change_bit() 111 return oldval; in test_and_change_bit()
|
/arch/sparc/include/asm/ |
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 45 __futex_cas_op("mov\t%4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 48 __futex_cas_op("add\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 51 __futex_cas_op("or\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 54 __futex_cas_op("andn\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 57 __futex_cas_op("xor\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 66 *oval = oldval; in arch_futex_atomic_op_inuser() 73 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/arch/xtensa/include/asm/ |
D | futex.h | 24 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 43 : "=&r" (oldval), "=&r" (ret) \ 50 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 60 __futex_atomic_op("mov %1, %4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 63 __futex_atomic_op("add %1, %0, %4", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 67 __futex_atomic_op("or %1, %0, %4", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 71 __futex_atomic_op("and %1, %0, %4", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 75 __futex_atomic_op("xor %1, %0, %4", ret, oldval, uaddr, in arch_futex_atomic_op_inuser() 85 *oval = oldval; in arch_futex_atomic_op_inuser() 92 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/arch/microblaze/include/asm/ |
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 41 __futex_atomic_op("or %1,%4,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 44 __futex_atomic_op("add %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 47 __futex_atomic_op("or %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 50 __futex_atomic_op("andn %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 53 __futex_atomic_op("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 …]
|
/arch/alpha/include/asm/ |
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 38 __futex_atomic_op("mov %3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 41 __futex_atomic_op("addl %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 44 __futex_atomic_op("or %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 47 __futex_atomic_op("andnot %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 50 __futex_atomic_op("xor %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 59 *oval = oldval; in arch_futex_atomic_op_inuser() 66 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/arch/mips/include/asm/ |
D | futex.h | 21 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 47 : "=r" (ret), "=&r" (oldval), \ 76 : "=r" (ret), "=&r" (oldval), \ 88 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 94 __futex_atomic_op("move $1, %z5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 99 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 103 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 107 ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 111 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 120 *oval = oldval; in arch_futex_atomic_op_inuser() [all …]
|
/arch/arm/include/asm/ |
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 119 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) in futex_atomic_cmpxchg_inatomic() 134 int oldval = 0, ret, tmp; in arch_futex_atomic_op_inuser() local 143 __futex_atomic_op("mov %0, %4", ret, oldval, tmp, uaddr, oparg); in arch_futex_atomic_op_inuser() [all …]
|
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()
|
/arch/powerpc/include/asm/ |
D | futex.h | 13 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 29 : "=&r" (oldval), "=&r" (ret) \ 36 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 42 __futex_atomic_op("mr %1,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 45 __futex_atomic_op("add %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 48 __futex_atomic_op("or %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 51 __futex_atomic_op("andc %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 54 __futex_atomic_op("xor %1,%0,%4\n", 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 …]
|
/arch/arc/include/asm/ |
D | futex.h | 21 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\ argument 42 : "=&r" (ret), "=&r" (oldval) \ 49 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\ argument 69 : "=&r" (ret), "=&r" (oldval) \ 79 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local 88 __futex_atomic_op("mov %0, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 92 __futex_atomic_op("add %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 95 __futex_atomic_op("or %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 98 __futex_atomic_op("bic %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 101 __futex_atomic_op("xor %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() [all …]
|
/arch/arm64/include/asm/ |
D | futex.h | 28 #define __futex_atomic_op(insn, ret, oldval, uaddr, tmp, oparg) \ argument 51 : "=&r" (ret), "=&r" (oldval), "+Q" (*uaddr), "=&r" (tmp), \ 61 int oldval = 0, ret, tmp; in arch_futex_atomic_op_inuser() local 69 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser() 73 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser() 77 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser() 81 ret, oldval, uaddr, tmp, ~oparg); in arch_futex_atomic_op_inuser() 85 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser() 94 *oval = oldval; in arch_futex_atomic_op_inuser() 101 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument [all …]
|
/arch/parisc/include/asm/ |
D | futex.h | 39 int oldval, ret; in arch_futex_atomic_op_inuser() local 46 if (unlikely(get_user(oldval, uaddr) != 0)) in arch_futex_atomic_op_inuser() 50 tmp = oldval; in arch_futex_atomic_op_inuser() 80 *oval = oldval; in arch_futex_atomic_op_inuser() 87 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument 113 if (val == oldval && unlikely(put_user(newval, uaddr) != 0)) { in futex_atomic_cmpxchg_inatomic()
|
/arch/m32r/kernel/ |
D | sys_m32r.c | 37 int oldval; in sys_tas() local 69 : "=&r" (oldval) in sys_tas() 77 return oldval; in sys_tas()
|