函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Send pid data out on exit

函数原型:void taskstats_exit(struct task_struct *tsk, int group_dead)

返回类型:void

参数:

类型参数名称
struct task_struct *tsk
intgroup_dead
596  如果非family_registered则返回
602  size等于taskstats_packet_size()
604  is_thread_group等于非非taskstats_tgid_alloc(tsk)
605  如果is_thread_group
607  size等于2乘size
609  fill_tgid_exit(tsk)
612  listeners等于raw_cpu_ptr( & listener_array)
613  如果链表为空则返回
616  rc等于prepare_reply(NULL, TASKSTATS_CMD_NEW, & rep_skb, size)
617  如果rc小于0则返回
620  stats等于mk_reply(rep_skb, TASKSTATS_TYPE_PID, task_pid_nr_ns(tsk, & PID-map pages start out as NULL, they get allocated upon* first use and are never deallocated. This way a low pid_max* value does not cause lots of bitmaps to be allocated, but* the scheme scales to up to 4 million PIDs, runtime.))
622  如果非stats则转到:err
625  fill_stats( & userns count is 1 for root user, 1 for init_uts_ns,* and 1 for... ?, & PID-map pages start out as NULL, they get allocated upon* first use and are never deallocated. This way a low pid_max* value does not cause lots of bitmaps to be allocated, but* the scheme scales to up to 4 million PIDs, runtime., tsk, stats)
630  如果非is_thread_group或非group_dead则转到:send
633  stats等于mk_reply(rep_skb, TASKSTATS_TYPE_TGID, task_tgid_nr_ns(tsk, & PID-map pages start out as NULL, they get allocated upon* first use and are never deallocated. This way a low pid_max* value does not cause lots of bitmaps to be allocated, but* the scheme scales to up to 4 million PIDs, runtime.))
635  如果非stats则转到:err
638  内存复制(stats, stats, stats的长度)
640  send :
641  Send taskstats data in @skb to listeners registered for @cpu's exit data
642  返回
643  err :
644  释放netlink消息