函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Wait-Die; wake a younger waiter context (when locks held) such that it can* die.* Among waiters with context, only the first one can have other locks acquired* already (ctx->acquired > 0), because __ww_mutex_add_waiter() and

函数原型:static bool __sched __ww_mutex_die(struct mutex *lock, struct mutex_waiter *waiter, struct ww_acquire_ctx *ww_ctx)

返回类型:bool

参数:

类型参数名称
struct mutex *lock
struct mutex_waiter *waiter
struct ww_acquire_ctx *ww_ctx
370  如果非is_wait_die则返回:false
373  如果acquired大于0且Determine if context @a is 'after' context @b. IOW, @a is a younger* transaction than @b and depending on algorithm either needs to wait for*@b or die.
375  debug_mutex_wake_waiter(lock, waiter)
376  唤醒中断线程
379  返回:true
调用者
名称描述
__ww_mutex_check_waitersWe just acquired @lock under @ww_ctx, if there are later contexts waiting* behind us on the wait-list, check if they need to die, or wound us.* See __ww_mutex_add_waiter() for the list-order construction; basically the
__ww_mutex_add_waiterAdd @waiter to the wait-list, keep the wait-list ordered by stamp, smallest* first