函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:hugetlb_sysfs_add_hstate

函数原型:static int hugetlb_sysfs_add_hstate(struct hstate *h, struct kobject *parent, struct kobject **hstate_kobjs, const struct attribute_group *hstate_attr_group)

返回类型:int

参数:

类型参数名称
struct hstate *h
struct kobject *parent
struct kobject **hstate_kobjs
const struct attribute_group *hstate_attr_group
2651  hi等于hstate_index(h)
2653  hstate_kobjs[hi]等于kobject_create_and_add() - Create a struct kobject dynamically and* register it with sysfs.*@name: the name for the kobject*@parent: the parent kobject of this kobject, if any.* This function creates a kobject structure dynamically and registers it
2654  如果非hstate_kobjs[hi]则返回:负ENOMEM
2657  retval等于sysfs_create_group(hstate_kobjs[hi], hstate_attr_group)
2658  如果retval递减引用计数对象
2661  返回:retval
调用者
名称描述
hugetlb_sysfs_init
hugetlb_register_nodeRegister hstate attributes for a single node device.* No-op if attributes already registered.