Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\mutex.c Create Date:2022-07-28 09:47:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static void __mutex_handoff(struct mutex *lock, struct task_struct *task)

Type:void

Parameter:

TypeParameterName
struct mutex *lock
struct task_struct *task
226  owner = atomic_long_read( & owner)
228  cycle
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  If task Then new |= MUTEX_FLAG_PICKUP
241  old = atomic_long_cmpxchg_release( & owner, owner, new)
242  If old == owner Then Break
245  owner = old
Caller
NameDescribe
__mutex_unlock_slowpath