Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\posix-cpu-timers.c Create Date:2022-07-28 10:47:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Functions for validating access to tasks.

Proto:static struct task_struct *lookup_task(const pid_t pid, bool thread, bool gettime)

Type:struct task_struct

Parameter:

TypeParameterName
const pid_tpid
boolthread
boolgettime
59  If Not pid Then Return If thread Then current process Else group_leader
62  p = find_task_by_vpid(pid)
63  If Not p Then Return p
66  If thread Then Return same_thread_group(p, current process) ? p : NULL
69  If gettime Then
79  Return (p == current process || thread_group_leader(p)) ? p : NULL
85  Return Do to the insanities of de_thread it is possible for a process* to have the pid of the thread group leader without actually being* the thread group leader ? p : NULL
Caller
NameDescribe
__get_task_for_clock