Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\include\asm\futex.h Create Date:2022-07-28 10:53:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:arch_futex_atomic_op_inuser

Proto:static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, unsigned int __user *uaddr)

Type:int

Parameter:

TypeParameterName
intop
intoparg
int *oval
unsigned int __user *uaddr
48  oldval = 0
50  These routines enable/disable the pagefault handler. If disabled, it will* not take any locks and go straight to the fixup table.* User access methods will not sleep when called from a pagefault_disabled()* environment.
53  Case op == (int *)UADDR2 = OPARG;
54  __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg)
55  Break
56  Case op == (int *)UADDR2 += OPARG;
57  __futex_atomic_op1(LOCK_PREFIX"xaddl %0, %2", ret, oldval, uaddr, oparg)
59  Break
60  Case op == (int *)UADDR2 |= OPARG;
61  __futex_atomic_op2("orl %4, %3", ret, oldval, uaddr, oparg)
62  Break
63  Case op == (int *)UADDR2 &= ~OPARG;
64  __futex_atomic_op2("andl %4, %3", ret, oldval, uaddr, ~oparg)
65  Break
66  Case op == (int *)UADDR2 ^= OPARG;
67  __futex_atomic_op2("xorl %4, %3", ret, oldval, uaddr, oparg)
68  Break
69  Default
70  ret = -ENOSYS
73  pagefault_enable()
75  If Not ret Then oval = oldval
78  Return ret
Caller
NameDescribe
futex_atomic_op_inuser