Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\timerfd.c Create Date:2022-07-28 20:19:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_timerfd_settime

Proto:static int do_timerfd_settime(int ufd, int flags, const struct itimerspec64 *new, struct itimerspec64 *old)

Type:int

Parameter:

TypeParameterName
intufd
intflags
const struct itimerspec64 *new
struct itimerspec64 *old
443  If flags & ~Flags for timerfd_settime. || Not itimerspec64_valid(new) Then Return -EINVAL
447  ret = timerfd_fget(ufd, & f)
448  If ret Then Return ret
450  ctx = needed for tty driver, and maybe others
452  If isalarm(ctx) && Not Check operation authority Then
453  fdput(f)
454  Return -EPERM
457  timerfd_setup_cancel(ctx, flags)
463  cycle
464  spin_lock_irq( & lock)
466  If isalarm(ctx) Then
469  Else
473  spin_unlock_irq( & lock)
475  If isalarm(ctx) Then hrtimer_cancel_wait_running( & timer)
477  Else hrtimer_cancel_wait_running( & tmr)
487  If expired && tintv Then
488  If isalarm(ctx) Then alarm_forward_now( & alarm, tintv)
490  Else hrtimer_forward_now - forward the timer expiry so it expires after now*@timer: hrtimer to forward*@interval: the interval to forward* Forward the timer expiry so it will expire after the current time* of the hrtimer clock base
494  it_value = Map the ktime_t to timespec conversion to ns_to_timespec function (timerfd_get_remaining(ctx))
495  it_interval = Map the ktime_t to timespec conversion to ns_to_timespec function (tintv)
500  ret = timerfd_setup(ctx, flags, new)
502  spin_unlock_irq( & lock)
503  fdput(f)
504  Return ret
Caller
NameDescribe
SYSCALL_DEFINE4