函数逻辑报告

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

函数名称: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.

函数原型:static inline bool __sched __ww_ctx_stamp_after(struct ww_acquire_ctx *a, struct ww_acquire_ctx *b)

返回类型:bool

参数:

类型参数名称
struct ww_acquire_ctx *a
struct ww_acquire_ctx *b
355  返回:stampstamp大于0
调用者
名称描述
__ww_mutex_dieWait-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
__ww_mutex_woundWound-Wait; wound a younger @hold_ctx if it holds the lock.* Wound the lock holder if there are waiters with older transactions than* the lock holders. Even if multiple waiters may wound the lock holder,* it's sufficient that only one does.
__ww_mutex_check_killCheck the wound condition for the current lock acquire
__ww_mutex_add_waiterAdd @waiter to the wait-list, keep the wait-list ordered by stamp, smallest* first