函数逻辑报告 |
Source Code:kernel\rcu\rcutorture.c |
Create Date:2022-07-27 11:23:10 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:rcu_torture_init
函数原型:static int __init rcu_torture_init(void)
返回类型:int
参数:无
2346 | firsterr等于0 |
2347 | static struct rcu_torture_ops * torture_ops[] = { & rcu_ops, & rcu_busted_ops, & srcu_ops, & As above, but dynamically allocated. , & As above, but broken due to inappropriate reader extension. , & tasks_ops, & trivial_ops, } |
2352 | 如果非Initialize torture module则返回:负EBUSY |
2357 | cur_ops等于torture_ops[i] |
2362 | 打印警报信息("rcu-torture: invalid torture type: \"%s\"\n", torture_type) |
2364 | 打印警报信息("rcu-torture types:") |
2365 | 以i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(torture_ops)循环打印标准信息(" %s", name) |
2367 | 打印标准信息("\n") |
2368 | WARN_ON(!IS_MODULE(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'm', 0* otherwise.(CONFIG_RCU_TORTURE_TEST)) |
2370 | cur_ops = NULL |
2371 | 转到:unwind |
2373 | 如果fqs恒等于NULL且fqs_duration不等于0则 |
2374 | 打印警报信息("rcu-torture: ->fqs NULL and non-zero fqs_duration, fqs disabled.\n") |
2375 | fqs_duration等于0 |
2380 | 如果nreaders大于等于0则 |
2381 | nrealreaders等于nreaders |
2382 | 否则 |
2383 | nrealreaders等于num_online_cpus()减2减nreaders |
2384 | 如果nrealreaders小于等于0则nrealreaders等于1 |
2387 | rcu_torture_print_module_parms(cur_ops, "Start of test") |
2391 | 初始化链表头 |
2393 | rtort_mbtest等于0 |
2394 | 添加链表项 |
2400 | rcu_torture_current = NULL |
2401 | rcu_torture_current_version等于0 |
2402 | atomic_set( & n_rcu_torture_alloc, 0) |
2403 | atomic_set( & n_rcu_torture_alloc_fail, 0) |
2404 | atomic_set( & n_rcu_torture_free, 0) |
2405 | atomic_set( & n_rcu_torture_mberror, 0) |
2406 | atomic_set( & n_rcu_torture_error, 0) |
2407 | n_rcu_torture_barrier_error等于0 |
2408 | n_rcu_torture_boost_ktrerror等于0 |
2409 | n_rcu_torture_boost_rterror等于0 |
2410 | n_rcu_torture_boost_failure等于0 |
2411 | n_rcu_torture_boosts等于0 |
2412 | 以i小于RCU_TORTURE_PIPE_LEN加1循环atomic_set( & rcu_torture_wcount[i], 0) |
2415 | 以i小于RCU_TORTURE_PIPE_LEN加1循环 |
2416 | per_cpu(rcu_torture_count, cpu)[i]等于0 |
2417 | per_cpu(rcu_torture_batch, cpu)[i]等于0 |
2420 | err_segs_recorded等于0 |
2421 | rt_read_nsegs等于0 |
2429 | 如果nfakewriters大于0则 |
2430 | fakewriter_tasks等于分配数组内存并置零 |
2433 | 如果(fakewriter_tasks == NULL)则 |
2439 | 以i小于nfakewriters循环 |
2445 | reader_tasks等于分配数组内存并置零 |
2447 | 如果(reader_tasks == NULL)则 |
2452 | 以i小于nrealreaders循环 |
2458 | 如果stat_interval大于0则 |
2464 | 如果test_no_idle_hz且shuffle_interval大于0则 |
2465 | firsterr等于torture_shuffle_init(shuffle_interval * HZ) |
2471 | 如果stutter则 |
2475 | firsterr等于torture_stutter_init(stutter * HZ, t) |
2479 | 如果fqs_duration小于0则fqs_duration等于0 |
2481 | 如果fqs_duration则 |
2488 | 如果test_boost_interval小于1则test_boost_interval等于1 |
2490 | 如果test_boost_duration小于2则test_boost_duration等于2 |
2492 | 如果rcu_torture_can_boost()则 |
2520 | 如果object_debug则Verify that double-free causes debug-objects to complain, but only* if CONFIG_DEBUG_OBJECTS_RCU_HEAD=y. Otherwise, say that the test* cannot be carried out. |
2523 | 返回:0 |
2525 | unwind : |
2527 | rcu_torture_cleanup() |
2528 | 返回:firsterr |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |