函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:look up cgroup associated with current task's cgroup namespace on the* specified hierarchy

函数原型:static struct cgroup *current_cgns_cgroup_from_root(struct cgroup_root *root)

返回类型:struct cgroup

参数:

类型参数名称
struct cgroup_root *root
1363  struct cgroup * res = NULL
1366  lockdep_assert_held( & css_set_lock)
1368  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1370  cset等于root_cset
1371  如果cset恒等于The default css_set - used by init and its children prior to any* hierarchies being mounted
1372  res等于 The root cgroup. Root is destroyed on its release.
1373  否则如果root恒等于The default hierarchy, reserved for the subsystems that are otherwise* unattached - it never has more than a single cgroup, and all tasks are* part of that cgroup.
1374  res等于he default cgroup associated with this css_set
1375  否则
1379  c等于he cgroup and css_set this link associates
1381  如果root恒等于root
1382  res等于c
1383  退出
1387  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1389  BUG_ON(!res)
1390  返回:res
调用者
名称描述
cgroup_show_path