函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\timerfd.c Create Date:2022-07-29 10:51:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:do_timerfd_settime

函数原型:static int do_timerfd_settime(int ufd, int flags, const struct itimerspec64 *new, struct itimerspec64 *old)

返回类型:int

参数:

类型参数名称
intufd
intflags
const struct itimerspec64 *new
struct itimerspec64 *old
443  如果flags按位与Flags for timerfd_settime. 的反或非itimerspec64_valid(new)则返回:负EINVAL
447  ret等于timerfd_fget(ufd, & f)
448  如果ret则返回:ret
450  ctx等于 needed for tty driver, and maybe others
452  如果isalarm(ctx)且非操作权限检查
453  fdput(f)
454  返回:负EPERM
457  timerfd_setup_cancel(ctx, flags)
463  循环
464  spin_lock_irq( & lock)
466  如果isalarm(ctx)则
469  否则
473  spin_unlock_irq( & lock)
475  如果isalarm(ctx)则hrtimer_cancel_wait_running( & timer)
477  否则hrtimer_cancel_wait_running( & tmr)
487  如果expiredtintv
488  如果isalarm(ctx)则alarm_forward_now( & alarm, tintv)
490  否则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  返回:ret
调用者
名称描述
SYSCALL_DEFINE4