函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:srcu_readers_active - returns true if there are readers. and false* otherwise*@ssp: which srcu_struct to count active readers (holding srcu_read_lock).* Note that this is not an atomic primitive, and can therefore suffer

函数原型:static bool srcu_readers_active(struct srcu_struct *ssp)

返回类型:bool

参数:

类型参数名称
struct srcu_struct *ssp
336  sum等于0
338  遍历可用CPU(cpu)
339  cpuc等于per_cpu_ptr(sda, cpu)
341  sum加等于READ_ONCE(srcu_lock_count[0])
342  sum加等于READ_ONCE(srcu_lock_count[1])
343  sum减等于READ_ONCE(srcu_unlock_count[0])
344  sum减等于READ_ONCE(srcu_unlock_count[1])
346  返回:sum
调用者
名称描述
cleanup_srcu_structleanup_srcu_struct - deconstruct a sleep-RCU structure*@ssp: structure to clean up.* Must invoke this after you are finished using a given srcu_struct that* was initialized via init_srcu_struct(), else you leak memory.