Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:get_cpu_itimer

Proto:static void get_cpu_itimer(struct task_struct *tsk, unsigned int clock_id, struct itimerspec64 *const value)

Type:void

Parameter:

TypeParameterName
struct task_struct *tsk
unsigned intclock_id
struct itimerspec64 *constvalue
51  it = it[clock_id]
53  spin_lock_irq( & siglock)
55  val = expires
56  interval = incr
57  If val Then
60  hread_group_sample_cputime - Sample cputime for a given task*@tsk: Task for which cputime needs to be started*@samples: Storage for time samples* Called from sys_getitimer() to calculate the expiry time of an active* timer
61  t = samples[clock_id]
63  If val < t Then val = TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ
66  Else val -= t
70  spin_unlock_irq( & siglock)
72  it_value = s_to_timespec64 - Convert nanoseconds to timespec64*@nsec: the nanoseconds value to be converted* Returns the timespec64 representation of the nsec parameter.
73  it_interval = s_to_timespec64 - Convert nanoseconds to timespec64*@nsec: the nanoseconds value to be converted* Returns the timespec64 representation of the nsec parameter.
Caller
NameDescribe
do_getitimer