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:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__get_task_for_clock

Proto:static struct task_struct *__get_task_for_clock(const clockid_t clock, bool getref, bool gettime)

Type:struct task_struct

Parameter:

TypeParameterName
const clockid_tclock
boolgetref
boolgettime
91  thread = Not Not CPUCLOCK_PERTHREAD(clock)
92  pid = Bit fields within a clockid:* The most significant 29 bits hold either a pid or a file descriptor.* Bit 2 indicates whether a cpu clock refers to a thread or a process.* Bits 1 and 0 give the type: PROF=0, VIRT=1, SCHED=2, or FD=3.(clock)
95  If CPUCLOCK_WHICH(clock) >= CPUCLOCK_MAX Then Return NULL
98  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
99  p = Functions for validating access to tasks.
100  If p && getref Then get_task_struct(p)
102  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
103  Return p
Caller
NameDescribe
get_task_for_clock
get_task_for_clock_get
validate_clock_permissions