函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:pid_idr_init

函数原型:void __init pid_idr_init(void)

返回类型:void

参数:

567  BUILD_BUG_ON - break compile if a condition is true(A maximum of 4 million PIDs should be enough for a while.* [NOTE: PID/TIDs are limited to 2^29 ~= 500+ million, see futex.h.] >= PIDNS_ADDING)
570  pid_max等于两数取小(pid_max_max, max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, pid_max, Define a minimum number of pids per cpu. Heuristically based* on original pid max of 32k for 32 cpus. Also, increase the* minimum settable value for pid_max on the running system based* on similar defaults. See kernel/pid.c:pidmap_init() for details. * num_possible_cpus()))
572  pid_max_min等于max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, pid_max_min, PIDS_PER_CPU_MIN * num_possible_cpus())
574  打印信息("pid_max: default: %u minimum: %u\n", pid_max, pid_max_min)
576  dr_init() - Initialise an IDR.*@idr: IDR handle.* Initialise a dynamically allocated IDR. To initialise a* statically allocated IDR, use DEFINE_IDR().
578  分配pid的slab的地址等于Please use this macro to create slab caches. Simply specify the* name of the structure and maybe some flags that are listed above.* The alignment of the struct determines object alignment. If you* f(pid, Align objs on cache lines | Panic if kmem_cache_create() fails | SLAB_ACCOUNT)
调用者
名称描述
start_kernel启动内核