Function report |
Source Code:kernel\rcu\tree.c |
Create Date:2022-07-28 10:27:24 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Helper function for rcu_init() that initializes the rcu_state structure.
Proto:static void __init rcu_init_one(void)
Type:void
Parameter:Nothing
3379 | buf[] = RCU_NODE_NAME_INIT |
3380 | fqs[] = RCU_FQS_NAME_INIT |
3385 | cpustride = 1 |
3390 | BUILD_BUG_ON - break compile if a condition is true(RCU_NUM_LVLS > ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(buf)) |
3393 | If rcu_num_lvls <= 0 || rcu_num_lvls > RCU_NUM_LVLS Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns. |
3398 | When i < rcu_num_lvls cycle level[i] = level[i - 1] + Number of rcu_nodes at specified level. [i - 1] |
3406 | cpustride *= levelspread[i] |
3408 | When j < Number of rcu_nodes at specified level. [i] cycle |
3409 | raw_spin_lock_init( & ACCESS_PRIVATE(rnp, lock)) |
3410 | lockdep_set_class_and_name( & ACCESS_PRIVATE(rnp, lock), & rcu_node_class[i], buf[i]) |
3412 | raw_spin_lock_init( & fqslock) |
3413 | lockdep_set_class_and_name( & fqslock, & rcu_fqs_class[i], fqs[i]) |
3419 | qsmaskinit = 0 |
3420 | lowest-numbered CPU or group here. = j * cpustride |
3421 | highest-numbered CPU or group here. = (j + 1) * cpustride - 1 |
3422 | If highest-numbered CPU or group here. >= nr_cpu_ids Then highest-numbered CPU or group here. = nr_cpu_ids - 1 |
3424 | If i == 0 Then |
3425 | CPU/group number for next level up. = 0 |
3426 | Mask to apply to parent qsmask. = 0 |
3427 | cu_node tree? = NULL |
3428 | Else |
3429 | CPU/group number for next level up. = j % levelspread[i - 1] |
3431 | cu_node tree? = level[i - 1] + j / levelspread[i - 1] |
3434 | is at level 0. = i |
3436 | rcu_init_one_nocb(rnp) |
3437 | init_waitqueue_head( & exp_wq[0]) |
3438 | init_waitqueue_head( & exp_wq[1]) |
3439 | init_waitqueue_head( & exp_wq[2]) |
3440 | init_waitqueue_head( & exp_wq[3]) |
3441 | Process spin lock initialization( & exp_lock) |
3445 | init_swait_queue_head( & Where GP task waits. ) |
3446 | init_swait_queue_head( & Wait for check-ins. ) |
3448 | for_each_possible_cpu(i) |
Name | Describe |
---|---|
rcu_init |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |