函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:prepare_reply

函数原型:static int prepare_reply(struct genl_info *info, u8 cmd, struct sk_buff **skbp, size_t size)

返回类型:int

参数:

类型参数名称
struct genl_info *info
u8cmd
struct sk_buff **skbp
size_tsize
78  skb等于genlmsg_new - Allocate a new generic netlink message*@payload: size of the message payload*@flags: the type of memory to allocate.
79  如果非skb则返回:负ENOMEM
82  如果非info
83  seq等于this_cpu_inc_return(taskstats_seqnum)减1
85  reply等于genlmsg_put(skb, 0, seq, & family, 0, cmd)
86  否则reply等于genlmsg_put_reply - Add generic netlink header to a reply message*@skb: socket buffer holding the message*@info: receiver info*@family: generic netlink family*@flags: netlink message flags*@cmd: generic netlink command* Returns pointer to user specific
88  如果(reply == NULL)则
89  释放netlink消息
90  返回:负EINVAL
93  skbp等于skb
94  返回:0
调用者
名称描述
cgroupstats_user_cmd
cmd_attr_pid
cmd_attr_tgid
taskstats_exitSend pid data out on exit