Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Add @waiter to a given location in the lock wait_list and set the* FLAG_WAITERS flag if it's the first waiter.

Proto:static void __sched __mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, struct list_head *list)

Type:void

Parameter:

TypeParameterName
struct mutex *lock
struct mutex_waiter *waiter
struct list_head *list
211  debug_mutex_add_waiter(lock, waiter, current process)
213  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
214  If __mutex_waiter_is_first(lock, waiter) Then __mutex_set_flag(lock, @owner: contains: 'struct task_struct *' to the current lock owner,* NULL means not owned. Since task_struct pointers are aligned at* at least L1_CACHE_BYTES, we have low bits to store extra state.)
Caller
NameDescribe
__ww_mutex_add_waiterAdd @waiter to the wait-list, keep the wait-list ordered by stamp, smallest* first
__mutex_lock_commonLock a mutex (possibly interruptible), slowpath: