Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:The task_struct pointer of the last owning reader will be left in* the owner field.* Note that the owner value just indicates the task has owned the rwsem* previously, it may not be the real owner or one of the real owners

Proto:static inline void __rwsem_set_reader_owned(struct rw_semaphore *sem, struct task_struct *owner)

Type:void

Parameter:

TypeParameterName
struct rw_semaphore *sem
struct task_struct *owner
206  val = owner | The least significant 3 bits of the owner value has the following* meanings when set.* - Bit 0: RWSEM_READER_OWNED - The rwsem is owned by readers* - Bit 1: RWSEM_RD_NONSPINNABLE - Readers cannot spin on this lock. | atomic_long_read( & Write owner or one of the read owners as well flags regarding* the current state of the rwsem. Can be used as a speculative* check to see if the write owner is running on the cpu.) & RWSEM_RD_NONSPINNABLE
209  atomic_long_set( & Write owner or one of the read owners as well flags regarding* the current state of the rwsem. Can be used as a speculative* check to see if the write owner is running on the cpu., val)
Caller
NameDescribe
rwsem_set_reader_owned
rwsem_mark_wakehandle 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
down_read_non_owner