Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static void __sched __ww_mutex_check_waiters(struct mutex *lock, struct ww_acquire_ctx *ww_ctx)

Type:void

Parameter:

TypeParameterName
struct mutex *lock
struct ww_acquire_ctx *ww_ctx
448  lockdep_assert_held( & wait_lock)
451  If Not ww_ctx Then Continue
454  If 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 || Wound-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. Then Break
Caller
NameDescribe
ww_mutex_set_context_fastpathAfter acquiring lock with fastpath, where we do not hold wait_lock, set ctx* and wake up any waiters so they can recheck.
__mutex_lock_commonLock a mutex (possibly interruptible), slowpath: