函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Initialize non-compile-time initialized fields, including the* associated srcu_node and srcu_data structures. The is_static* parameter is passed through to init_srcu_struct_nodes(), and* also tells us that ->sda has already been wired up to srcu_data.

函数原型:static int init_srcu_struct_fields(struct srcu_struct *ssp, bool is_static)

返回类型:int

参数:

类型参数名称
struct srcu_struct *ssp
boolis_static
170  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & srcu_cb_mutex)
171  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & srcu_gp_mutex)
172  Current reader array element. 等于0
173  srcu_gp_seq等于0
174  srcu_barrier_seq等于0
175  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & srcu_barrier_mutex)
176  atomic_set( & srcu_barrier_cpu_cnt, 0)
177  INIT_DELAYED_WORK( & work, process_srcu)
178  如果非is_staticsda等于alloc_percpu(structsrcu_data)
180  Initialize SRCU combining tree. Note that statically allocated* srcu_struct structures might already have srcu_read_lock() and* srcu_read_unlock() running against them. So if the is_static parameter
181  srcu_gp_seq_needed_exp等于0
182  srcu_last_gp_end等于ktime_get_mono_fast_ns()
183  smp_store_release( & srcu_gp_seq_needed, 0)
184  返回:如果sda则0否则负ENOMEM
调用者
名称描述
__init_srcu_struct
check_init_srcu_structFirst-use initialization of statically allocated srcu_struct* structure