函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ex_proxy_trylock_atomic() - Attempt an atomic lock for the top waiter*@pifutex: the user address of the to futex*@hb1: the from futex hash bucket, must be locked by the caller*@hb2: the to futex hash bucket, must be locked by the caller*@key1: the from

函数原型:static int futex_proxy_trylock_atomic(unsigned int __user *pifutex, struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2, union futex_key *key1, union futex_key *key2, struct futex_pi_state **ps, struct task_struct **exiting, int set_waiters)

返回类型:int

参数:

类型参数名称
unsigned int __user *pifutex
struct futex_hash_bucket *hb1
struct futex_hash_bucket *hb2
union futex_key *key1
union futex_key *key2
struct futex_pi_state **ps
struct task_struct **exiting
intset_waiters
1938  struct futex_q * top_waiter = NULL
1942  如果get_futex_value_locked( & curval, pifutex)则返回:负EFAULT
1945  如果此条件成立可能性小(为编译器优化)(should_fail_futex(true))则返回:负EFAULT
1956  top_waiter等于ex_top_waiter() - Return the highest priority waiter on a futex*@hb: the hash bucket the futex_q's reside in*@key: the futex key (to distinguish it from other futex futex_q's)* Must be called with the hb lock held.
1959  如果非top_waiter则返回:0
1963  如果非match_futex - Check whether two futex keys are equal*@key1: Pointer to key1*@key2: Pointer to key2* Return 1 if two futex_keys are equal, 0 otherwise.则返回:负EINVAL
1971  vpid等于task_pid_vnr(task)
1972  ret等于ex_lock_pi_atomic() - Atomic work required to acquire a pi aware futex*@uaddr: the pi futex user address*@hb: the pi futex hash bucket*@key: the futex key associated with uaddr and hb*@ps: the pi_state pointer where we store the result of the* lookup
1974  如果ret恒等于1则
1975  queue_pi_wake_futex() - Wake a task that acquired the lock during requeue*@q: the futex_q*@key: the key of the requeue target futex*@hb: the hash_bucket of the requeue target futex* During futex_requeue, with requeue_pi=1, it is possible to acquire the
1976  返回:vpid
1978  返回:ret
调用者
名称描述
futex_requeueex_requeue() - Requeue waiters from uaddr1 to uaddr2*@uaddr1: source futex user address*@flags: futex flags (FLAGS_SHARED, etc