函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Give up ownership to a specific task, when @task = NULL, this is equivalent* to a regular unlock. Sets PICKUP on a handoff, clears HANDOF, preserves* WAITERS. Provides RELEASE semantics like a regular unlock, the

函数原型:static void __mutex_handoff(struct mutex *lock, struct task_struct *task)

返回类型:void

参数:

类型参数名称
struct mutex *lock
struct task_struct *task
226  owner等于atomic_long_read( & owner)
228  循环
236  new等于owner按位与@owner: contains: 'struct task_struct *' to the current lock owner,* NULL means not owned. Since task_struct pointers are aligned at* at least L1_CACHE_BYTES, we have low bits to store extra state.
237  new或等于task
238  如果tasknew或等于MUTEX_FLAG_PICKUP
241  old等于atomic_long_cmpxchg_release( & owner, owner, new)
242  如果old恒等于owner退出
245  owner等于old
调用者
名称描述
__mutex_unlock_slowpath