函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\rwsem.c Create Date:2022-07-27 10:48:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:rwsem_read_trylock

函数原型:static inline bool rwsem_read_trylock(struct rw_semaphore *sem)

返回类型:bool

参数:

类型参数名称
struct rw_semaphore *sem
276  cnt等于atomic_long_add_return_acquire(RWSEM_READER_BIAS, & count)
277  如果WARN_ON_ONCE(cnt < 0)则Set the RWSEM_NONSPINNABLE bits if the RWSEM_READER_OWNED flag* remains set. Otherwise, the operation will be aborted.
279  返回:非cnt按位与RWSEM_READ_FAILED_MASK的值
调用者
名称描述
__down_readlock for reading
__down_read_killable