arch/x86/include/asm/futex_robust.h

Source file repositories/reference/linux-study-clean/arch/x86/include/asm/futex_robust.h

File Facts

System
Linux kernel
Corpus path
arch/x86/include/asm/futex_robust.h
Extension
.h
Size
525 bytes
Lines
20
Domain
Architecture Layer
Bucket
arch/x86
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _ASM_X86_FUTEX_ROBUST_H
#define _ASM_X86_FUTEX_ROBUST_H

#include <asm/ptrace.h>

static __always_inline void __user *x86_futex_robust_unlock_get_pop(struct pt_regs *regs)
{
	/*
	 * If ZF is set then the cmpxchg succeeded and the pending op pointer
	 * needs to be cleared.
	 */
	return regs->flags & X86_EFLAGS_ZF ? (void __user *)regs->dx : NULL;
}

#define arch_futex_robust_unlock_get_pop(regs)	\
	x86_futex_robust_unlock_get_pop(regs)

#endif /* _ASM_X86_FUTEX_ROBUST_H */

Annotation

Implementation Notes