Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\cgroup.h Create Date:2022-07-28 05:55:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static inline struct cgroup *cgroup_ancestor(struct cgroup *cgrp, int ancestor_level)

Type:struct cgroup

Parameter:

TypeParameterName
struct cgroup *cgrp
intancestor_level
590  If * 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 Then Return NULL
592  When 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 cycle
593  cgrp = cgroup_parent(cgrp)
594  Return cgrp