1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _ASM_X86_FUTEX_ROBUST_H 3 #define _ASM_X86_FUTEX_ROBUST_H 4 5 #include <asm/ptrace.h> 6 7 static __always_inline void __user *x86_futex_robust_unlock_get_pop(struct pt_regs *regs) 8 { 9 /* 10 * If ZF is set then the cmpxchg succeeded and the pending op pointer 11 * needs to be cleared. 12 */ 13 return regs->flags & X86_EFLAGS_ZF ? (void __user *)regs->dx : NULL; 14 } 15 16 #define arch_futex_robust_unlock_get_pop(regs) \ 17 x86_futex_robust_unlock_get_pop(regs) 18 19 #endif /* _ASM_X86_FUTEX_ROBUST_H */ 20