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

Name:Sample a process (thread group) clock for the given task clkid. If the* group's cputime accounting is already enabled, read the atomic* store. Otherwise a full update is required. Task's sighand lock must be

Proto:static u64 cpu_clock_sample_group(const clockid_t clkid, struct task_struct *p, bool start)

Type:u64

Parameter:

TypeParameterName
const clockid_tclkid
struct task_struct *p
boolstart
346  cputimer = cputimer
347  pct = Empty if CONFIG_POSIX_CPUTIMERS=n
350  If Not READ_ONCE(timers_active) Then
351  If start Then hread_group_start_cputime - Start cputime and return a sample*@tsk: Task for which cputime needs to be started*@samples: Storage for time samples* The thread group cputime accouting is avoided when there are no posix* CPU timers armed
353  Else __thread_group_cputime(p, samples)
355  Else
356  proc_sample_cputime_atomic( & cputime_atomic, samples)
359  Return samples[clkid]
Caller
NameDescribe
posix_cpu_clock_get
posix_cpu_timer_setGuts of sys_timer_settime for CPU timers.* This is called with the timer locked and interrupts disabled.* If we return TIMER_RETRY, it's necessary to release the timer's lock* and try again. (This happens when the timer is in the middle of firing.)
posix_cpu_timer_get
posix_cpu_timer_rearm
set_process_cpu_timerSet one of the process-wide special case CPU timers or RLIMIT_CPU.* The tsk->sighand->siglock must be held by the caller.