Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:handle waking up a waiter on the semaphore* - up_read/up_write has decremented the active part of count if we come here

Proto:static struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem, long count)

Type:struct rw_semaphore

Parameter:

TypeParameterName
struct rw_semaphore *sem
longcount
1306  raw_spin_lock_irqsave( & wait_lock, flags)
1308  If Not list_empty - tests whether a list is empty*@head: the list to test. Then handle the lock release when processes blocked on it that can now run* - if we come here from up_xxxx(), then the RWSEM_FLAG_WAITERS bit must* have been set
1311  raw_spin_unlock_irqrestore( & wait_lock, flags)
1312  wake_up_q( & wake_q)
1314  Return sem
Caller
NameDescribe
__up_readlock after reading
__up_writelock after writing