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

Name:Set one of the process-wide special case CPU timers or RLIMIT_CPU.* The tsk->sighand->siglock must be held by the caller.

Proto:void set_process_cpu_timer(struct task_struct *tsk, unsigned int clkid, u64 *newval, u64 *oldval)

Type:void

Parameter:

TypeParameterName
struct task_struct *tsk
unsigned intclkid
u64 *newval
u64 *oldval
1183  If WARN_ON_ONCE(clkid >= CPUCLOCK_SCHED) Then Return
1186  nextevt = nextevt
1187  now = 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
1189  If oldval Then
1195  If oldval Then
1196  If oldval <= now Then
1199  Else
1200  oldval -= now
1204  If Not newval Then Return
1206  newval += now
1213  If newval < nextevt Then nextevt = newval
1216  tick_dep_set_signal( Signal handlers: , TICK_DEP_BIT_POSIX_TIMER)
Caller
NameDescribe
update_rlimit_cpuCalled after updating RLIMIT_CPU to run cpu timer and update* tsk->signal->posix_cputimers.bases[clock].nextevt expiration cache if* necessary. Needs siglock protection since other code may update the* expiration cache as well.
set_cpu_itimer