函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Drops a reference to the pi_state object and frees or caches it* when the last reference is gone.

函数原型:static void put_pi_state(struct futex_pi_state *pi_state)

返回类型:void

参数:

类型参数名称
struct futex_pi_state *pi_state
854  如果非pi_state则返回
857  如果非_dec_and_test - decrement a refcount and test if it is 0*@r: the refcount* Similar to atomic_dec_and_test(), it will WARN on underflow and fail to* decrement when saturated at REFCOUNT_SATURATED则返回
864  如果owner
867  关闭本地中断,获取所要保护的运行队列(runqueue)的自旋锁(spinlock),为查找可运行进程做准备。( & 保护自旋锁)
868  owner等于owner
869  如果owner
874  _mutex_proxy_unlock - release a lock on behalf of owner*@lock: the rt_mutex to be locked* No locking. Caller has to do serializing itself* Special API call for PI-futex support. This merrily cleans up the rtmutex* (debugging) state
875  raw_spin_unlock_irq( & 保护自旋锁)
878  如果pi_state_cache
879  kfree(pi_state)
880  否则
886  owner = NULL
887  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
888  pi_state_cache等于pi_state
调用者
名称描述
futex_requeueex_requeue() - Requeue waiters from uaddr1 to uaddr2*@uaddr1: source futex user address*@flags: futex flags (FLAGS_SHARED, etc
unqueue_me_piPI futexes can not be requeued and must remove themself from the* hash bucket. The hash bucket lock (i.e. lock_ptr) is held on entry* and dropped here.
futex_lock_piUserspace tried a 0 -> TID atomic transition of the futex value* and failed. The kernel side here does the whole locking operation:* if there are waiters then it will block as a consequence of relying* on rt-mutexes, it does PI, etc
futex_unlock_piUserspace attempted a TID -> 0 atomic transition, and failed.* This is the in-kernel slowpath: we look up the PI state (if any),* and do the rt-mutex unlock.
futex_wait_requeue_piex_wait_requeue_pi() - Wait on uaddr and take uaddr2*@uaddr: the futex we initially wait on (non-pi)*@flags: futex flags (FLAGS_SHARED, FLAGS_CLOCKRT, etc