函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Trylock variant that retuns the owning task on failure.

函数原型:static inline struct task_struct *__mutex_trylock_or_owner(struct mutex *lock)

返回类型:struct task_struct

参数:

类型参数名称
struct mutex *lock
109  curr等于当前进程
111  owner等于atomic_long_read( & owner)
112  循环
113  flags等于__owner_flags(owner)
114  task等于owner按位与MUTEX_FLAGS的反
116  如果task
123  flags与等于MUTEX_FLAG_PICKUP的反
124  否则flags与等于MUTEX_FLAG_HANDOFF的反
137  old等于atomic_long_cmpxchg_acquire( & owner, owner, curr | flags)
138  如果old恒等于owner则返回:NULL
141  owner等于old
144  返回:__owner_task(owner)
调用者
名称描述
__mutex_trylockActual trylock that will work on any unlocked state.