Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:rwsem_read_trylock

Proto:static inline bool rwsem_read_trylock(struct rw_semaphore *sem)

Type:bool

Parameter:

TypeParameterName
struct rw_semaphore *sem
276  cnt = atomic_long_add_return_acquire(RWSEM_READER_BIAS, & count)
277  If WARN_ON_ONCE(cnt < 0) Then Set the RWSEM_NONSPINNABLE bits if the RWSEM_READER_OWNED flag* remains set. Otherwise, the operation will be aborted.
279  Return Not (cnt & RWSEM_READ_FAILED_MASK)
Caller
NameDescribe
__down_readlock for reading
__down_read_killable