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:Set the RWSEM_NONSPINNABLE bits if the RWSEM_READER_OWNED flag* remains set. Otherwise, the operation will be aborted.

Proto:static inline void rwsem_set_nonspinnable(struct rw_semaphore *sem)

Type:void

Parameter:

TypeParameterName
struct rw_semaphore *sem
263  owner = 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.)
265  Do
266  If Not (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.) Then Break
268  If owner & RWSEM_NONSPINNABLE Then Break
270  When Not atomic_long_try_cmpxchg( & 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., & owner, owner | RWSEM_NONSPINNABLE) cycle
Caller
NameDescribe
rwsem_read_trylock