函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cgroup_addrm_files

函数原型:static int cgroup_addrm_files(struct cgroup_subsys_state *css, struct cgroup *cgrp, struct cftype cfts[], bool is_add)

返回类型:int

参数:

类型参数名称
struct cgroup_subsys_state *css
struct cgroup *cgrp
struct cftypecfts
boolis_add
3865  struct cftype * cft, * cft_end = NULL
3866  ret等于0
3868  lockdep_assert_held( & cgroup_mutex is the master lock)
3870  restart :
3871 cft不等于cft_endBy convention, the name should begin with the name of the* subsystem, followed by a period. Zero length string indicates* end of cftype array.[0]不等于'\0'循环
3873  如果CFTYPE_* flags 按位与__CFTYPE_ONLY_ON_DFL且非group_on_dfl - test whether a cgroup is on the default hierarchy*@cgrp: the cgroup of interest* The default hierarchy is the v2 interface of cgroup and this function* can be used to test whether a cgroup is on the default hierarchy for* cases where a 则继续下一循环
3875  如果CFTYPE_* flags 按位与__CFTYPE_NOT_ON_DFLgroup_on_dfl - test whether a cgroup is on the default hierarchy*@cgrp: the cgroup of interest* The default hierarchy is the v2 interface of cgroup and this function* can be used to test whether a cgroup is on the default hierarchy for* cases where a 则继续下一循环
3877  如果CFTYPE_* flags 按位与CFTYPE_NOT_ON_ROOT且非cgroup_parent(cgrp)则继续下一循环
3879  如果CFTYPE_* flags 按位与CFTYPE_ONLY_ON_ROOTcgroup_parent(cgrp)则继续下一循环
3881  如果CFTYPE_* flags 按位与CFTYPE_DEBUG且非cgroup_debug则继续下一循环
3883  如果is_add
3884  ret等于cgroup_add_file(css, cgrp, cft)
3885  如果ret
3892  否则
3896  返回:ret
调用者
名称描述
css_clear_dirss_clear_dir - remove subsys files in a cgroup directory*@css: taget css
css_populate_dirss_populate_dir - create subsys files in a cgroup directory*@css: target css* On failure, no file is added.
cgroup_apply_cftypes