函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\rtmutex_common.h Create Date:2022-07-27 10:52:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:rt_mutex_owner

函数原型:static inline struct task_struct *rt_mutex_owner(struct rt_mutex *lock)

返回类型:struct task_struct

参数:

类型参数名称
struct rt_mutex *lock
110  owner等于READ_ONCE(独占进程)
112  返回:owner按位与lock->owner state tracking:的反
调用者
名称描述
unlock_rt_mutex_safeSafe fastpath aware unlock:* 1) Clear the waiters bit* 2) Drop lock->wait_lock* 3) Try to unlock the lock with cmpxchg
rt_mutex_adjust_prio_chainAdjust the priority chain
try_to_take_rt_mutexTry to take an rt-mutex* Must be called with lock->wait_lock held and interrupts disabled*@lock: The lock to be acquired
task_blocks_on_rt_mutexTask blocks on lock.* Prepare waiter and propagate pi chain* This must be called with lock->wait_lock held and interrupts disabled
remove_waiterRemove a waiter from a lock and give up* Must be called with lock->wait_lock held and interrupts disabled. I must* have just failed to try_to_take_rt_mutex().
rt_mutex_slowtrylockSlow path try-lock function:
__rt_mutex_start_proxy_lock__rt_mutex_start_proxy_lock() - Start lock acquisition for another task*@lock: the rt_mutex to take*@waiter: the pre-initialized rt_mutex_waiter*@task: the task to prepare* Starts the rt_mutex acquire; it enqueues the @waiter and does deadlock* detection
rt_mutex_cleanup_proxy_lock_mutex_cleanup_proxy_lock() - Cleanup failed lock acquisition*@lock: the rt_mutex we were woken on*@waiter: the pre-initialized rt_mutex_waiter* Attempt to clean up after a failed __rt_mutex_start_proxy_lock() or* rt_mutex_wait_proxy_lock()
printk_lock
debug_rt_mutex_deadlockWe fill out the fields in the waiter to store the information about* the deadlock. We print when we return. act_waiter can be NULL in* case of a remove waiter operation.
debug_rt_mutex_unlock
debug_rt_mutex_proxy_unlock
fixup_pi_state_owner
fixup_ownerxup_owner() - Post lock pi_state and corner case management*@uaddr: user address of the futex*@q: futex_q (contains pi_state and access to the rt_mutex)*@locked: if the attempt to take the rt_mutex succeeded (1) or not (0)* After attempting to lock an
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_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