函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:group_ancestor - find ancestor of cgroup*@cgrp: cgroup to find ancestor of*@ancestor_level: level of ancestor to find starting from root* Find ancestor of cgroup at specified level starting from root if it exists* and return pointer to it

函数原型:static inline struct cgroup *cgroup_ancestor(struct cgroup *cgrp, int ancestor_level)

返回类型:struct cgroup

参数:

类型参数名称
struct cgroup *cgrp
intancestor_level
590  如果* The depth this cgroup is at. The root is at depth zero and each * step down the hierarchy increments the level. This along with * ancestor_ids[] can determine whether a given cgroup is a * descendant of another without traversing the hierarchy.小于ancestor_level则返回:NULL
592 cgrp* The depth this cgroup is at. The root is at depth zero and each * step down the hierarchy increments the level. This along with * ancestor_ids[] can determine whether a given cgroup is a * descendant of another without traversing the hierarchy.大于ancestor_level循环
593  cgrp等于cgroup_parent(cgrp)
594  返回:cgrp