函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:pidns_for_children_get

函数原型:static struct ns_common *pidns_for_children_get(struct task_struct *task)

返回类型:struct ns_common

参数:

类型参数名称
struct task_struct *task
355  struct pid_namespace * ns = NULL
357  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
358  如果命名空间代理
359  ns等于pid_ns_for_children
360  get_pid_ns(ns)
362  task_unlock(task)
364  如果ns
365  read_lock( & tasklist_lock)
366  如果非子进程回收器
367  put_pid_ns(ns)
368  ns = NULL
370  read_unlock( & tasklist_lock)
373  返回:ns ? & ns : NULL