Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\rcu\srcutree.c Create Date:2022-07-28 10:18:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static int init_srcu_struct_fields(struct srcu_struct *ssp, bool is_static)

Type:int

Parameter:

TypeParameterName
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  If Not is_static Then sda = 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  Return If sda Then 0 Else -ENOMEM
Caller
NameDescribe
__init_srcu_struct
check_init_srcu_structFirst-use initialization of statically allocated srcu_struct* structure