函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__get_task_for_clock

函数原型:static struct task_struct *__get_task_for_clock(const clockid_t clock, bool getref, bool gettime)

返回类型:struct task_struct

参数:

类型参数名称
const clockid_tclock
boolgetref
boolgettime
91  thread等于非非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  如果CPUCLOCK_WHICH(clock)大于等于CPUCLOCK_MAX则返回: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  如果pgetrefget_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  返回:p
调用者
名称描述
get_task_for_clock
get_task_for_clock_get
validate_clock_permissions