Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_setitimer

Proto:static int do_setitimer(int which, struct itimerspec64 *value, struct itimerspec64 *ovalue)

Type:int

Parameter:

TypeParameterName
intwhich
struct itimerspec64 *value
struct itimerspec64 *ovalue
213  tsk = current process
218  Case which == Names of the interval timers, and structure* defining a timer setting:
219  again :
220  spin_lock_irq( & siglock)
221  timer = real_timer
222  If ovalue Then
231  Go to again
233  expires = vert a timespec64 to ktime_t format:
234  If expires != 0 Then
238  Else it_real_incr = 0
241  mer_state - called when itimer is started or canceled*@which: name of the interval timer*@value: the itimers value, itimer is canceled if value->it_value is* zero, otherwise it is started*@expires: the itimers expiry time
242  spin_unlock_irq( & siglock)
243  Break
244  Case which == ITIMER_VIRTUAL
245  set_cpu_itimer(tsk, CPUCLOCK_VIRT, value, ovalue)
246  Break
247  Case which == ITIMER_PROF
248  set_cpu_itimer(tsk, CPUCLOCK_PROF, value, ovalue)
249  Break
250  Default
251  Return -EINVAL
253  Return 0
Caller
NameDescribe
clear_itimer
alarm_setitimeralarm_setitimer - set alarm in seconds*@seconds: number of seconds until alarm* 0 disables the alarm* Returns the remaining time in seconds of a pending timer or 0 when* the timer is not active
SYSCALL_DEFINE3
COMPAT_SYSCALL_DEFINE3