Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-28 13:41:41
Last Modify:2022-05-20 07:50:19 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Initialize the perf_event context in task_struct

Proto:int perf_event_init_task(struct task_struct *child)

Type:int

Parameter:

TypeParameterName
struct task_struct *child
12361  memset(perf_event_ctxp, 0, size of perf_event_ctxp )
12362  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & perf_event_mutex)
12363  Initialization list head
12366  ret = Initialize the perf_event context in task_struct
12367  If ret Then
12368  Free a context as created by inheritance by perf_event_init_task() below,* used by fork() in case of fail.* Even though the task has never lived, the context and events have been* exposed through the child_list, so we must take care tearing it all down.
12369  Return ret
12373  Return 0