函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\futex.c Create Date:2022-07-27 11:55:06
Last Modify:2020-03-17 15:28:32 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Process a futex-list entry, check whether it's owned by the* dying task, and do notification if so:

函数原型:static int handle_futex_death(unsigned int __user *uaddr, struct task_struct *curr, bool pi, bool pending_op)

返回类型:int

参数:

类型参数名称
unsigned int __user *uaddr
struct task_struct *curr
boolpi
boolpending_op
3553  nval等于nval
3557  如果uaddr取模uaddr的长度不等于0则返回:负1
3560  retry :
3561  如果Careful: we have to cast the result to the type of the pointer* for sign reasons(uval, uaddr)则返回:负1
3595  如果pending_op且非pi且非uval
3596  Wake up waiters matching bitset queued on this futex (uaddr).
3597  返回:0
3600  如果uval按位与The rest of the robust-futex field is for the TID:的值不等于task_pid_vnr(curr)则返回:0
3613  mval等于uval按位与Are there any waiters for this robust futex:按位或The kernel signals via this bit that a thread holding a futex* has exited without unlocking the futex. The kernel also does* a FUTEX_WAKE on such futexes, after setting the bit, to wake* up any possible waiters:
3624  如果err等于cmpxchg_futex_value_locked( & nval, uaddr, uval, mval)则
3626  :err恒等于负EFAULT
3629  转到:retry
3631  :err恒等于负EAGAIN
3632  cond_resched()
3633  转到:retry
3635  默认
3636  WARN_ON_ONCE(1)
3637  返回:err
3641  如果nval不等于uval则转到:retry
3648  如果非piuval按位与Are there any waiters for this robust futex:Wake up waiters matching bitset queued on this futex (uaddr).
3651  返回:0
调用者
名称描述
exit_robust_listWalk curr->robust_list (very carefully, it's a userspace list!)* and mark any locks found there dead, and notify any waiters.* We silently return on any sign of list-walking problem.
compat_exit_robust_list