函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:All writes to owner are protected by WRITE_ONCE() to make sure that* store tearing can't happen as optimistic spinners may read and use* the owner value concurrently without lock

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

返回类型:void

参数:

类型参数名称
struct rw_semaphore *sem
177  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., (long)当前进程)
调用者
名称描述
rwsem_try_write_lockThis function must be called with the sem->wait_lock held to prevent* race conditions between checking the rwsem wait list and setting the* If wstate is WRITER_HANDOFF, it will make sure that either the handoff
__down_writelock for writing
__down_write_killable
__down_write_trylock