函数逻辑报告 | 
Source Code:kernel\pid.c | 
Create Date:2022-07-27 10:28:56 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:分配进程句柄
函数原型:struct pid *alloc_pid(struct pid_namespace *ns, pid_t *set_tid, size_t set_tid_size)
返回类型:struct pid
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct pid_namespace * | ns | |
| pid_t * | set_tid | |
| size_t | set_tid_size | 
| 178 | 如果set_tid_size大于进程级别加1则返回:错误号 | 
| 189 | tid等于0 | 
| 191 | 如果set_tid_size则 | 
| 204 | 如果非ns_capable(user_ns, Allow setting zone reclaim policy )则转到:out_free | 
| 206 | set_tid_size自减 | 
| 210 | spin_lock_irq( & Note: disable interrupts while the pidmap_lock is held as an* interrupt might come in and do read_lock(&tasklist_lock)) | 
| 212 | 如果tid则 | 
| 221 | 否则 | 
| 222 | pid_min等于1 | 
| 237 | spin_unlock_irq( & Note: disable interrupts while the pidmap_lock is held as an* interrupt might come in and do read_lock(&tasklist_lock)) | 
| 240 | 如果nr小于0则 | 
| 250 | 如果此条件成立可能性小(为编译器优化)(是资源回收器)则 | 
| 251 | 如果pid_ns_prepare_proc(ns)则转到:out_free | 
| 255 | get_pid_ns(ns) | 
| 263 | spin_lock_irq( & Note: disable interrupts while the pidmap_lock is held as an* interrupt might come in and do read_lock(&tasklist_lock)) | 
| 264 | 如果非pid_allocated按位与PIDNS_ADDING的值则转到:out_unlock | 
| 271 | spin_unlock_irq( & Note: disable interrupts while the pidmap_lock is held as an* interrupt might come in and do read_lock(&tasklist_lock)) | 
| 273 | 返回:pid | 
| 275 | out_unlock : | 
| 276 | spin_unlock_irq( & Note: disable interrupts while the pidmap_lock is held as an* interrupt might come in and do read_lock(&tasklist_lock)) | 
| 277 | put_pid_ns(ns) | 
| 279 | out_free : | 
| 280 | spin_lock_irq( & Note: disable interrupts while the pidmap_lock is held as an* interrupt might come in and do read_lock(&tasklist_lock)) | 
| 290 | spin_unlock_irq( & Note: disable interrupts while the pidmap_lock is held as an* interrupt might come in and do read_lock(&tasklist_lock)) | 
| 292 | 释放一个对象 | 
| 293 | 返回:错误号 | 
| 名称 | 描述 | 
|---|---|
| copy_process | 创建进程 | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |