Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Check the wound condition for the current lock acquire

Proto:static inline int __sched __ww_mutex_check_kill(struct mutex *lock, struct mutex_waiter *waiter, struct ww_acquire_ctx *ctx)

Type:int

Parameter:

TypeParameterName
struct mutex *lock
struct mutex_waiter *waiter
struct ww_acquire_ctx *ctx
808  ww = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(lock, structww_mutex, base)
809  hold_ctx = READ_ONCE(ctx)
812  If acquired == 0 Then Return 0
815  If Not is_wait_die Then
816  If wounded Then Return __ww_mutex_kill(lock, ctx)
819  Return 0
822  If hold_ctx && 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. Then Return __ww_mutex_kill(lock, ctx)
829  cur = waiter
831  If Not ww_ctx Then Continue
834  Return __ww_mutex_kill(lock, ctx)
837  Return 0
Caller
NameDescribe
__mutex_lock_commonLock a mutex (possibly interruptible), slowpath: