函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Set the RWSEM_NONSPINNABLE bits if the RWSEM_READER_OWNED flag* remains set. Otherwise, the operation will be aborted.

函数原型:static inline void rwsem_set_nonspinnable(struct rw_semaphore *sem)

返回类型:void

参数:

类型参数名称
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  循环
266  如果非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.的值则退出
268  如果owner按位与RWSEM_NONSPINNABLE退出
270  当非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)循环
调用者
名称描述
rwsem_read_trylock