Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\taskstats.c Create Date:2022-07-28 11:49:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Send pid data out on exit

Proto:void taskstats_exit(struct task_struct *tsk, int group_dead)

Type:void

Parameter:

TypeParameterName
struct task_struct *tsk
intgroup_dead
596  If Not family_registered Then Return
602  size = taskstats_packet_size()
604  is_thread_group = Not Not taskstats_tgid_alloc(tsk)
605  If is_thread_group Then
607  size = 2 * size
609  fill_tgid_exit(tsk)
612  listeners = raw_cpu_ptr( & listener_array)
613  If list_empty - tests whether a list is empty*@head: the list to test. Then Return
616  rc = prepare_reply(NULL, TASKSTATS_CMD_NEW, & rep_skb, size)
617  If rc < 0 Then Return
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  If Not stats Then Go to 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  If Not is_thread_group || Not group_dead Then Go to 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  If Not stats Then Go to err
638  No 3D Now!(stats, stats, size of stats )
640  send :
641  Send taskstats data in @skb to listeners registered for @cpu's exit data
642  Return
643  err :
644  lmsg_free - free a netlink message*@skb: socket buffer of netlink message