函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:timerfd_read

函数原型:static ssize_t timerfd_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
char __user *buf
size_tcount
loff_t *ppos
249  ctx等于 needed for tty driver, and maybe others
251  ticks等于0
253  如果count小于ticks的长度则返回:负EINVAL
255  spin_lock_irq( & lock)
256  如果f_flags按位与O_NONBLOCKres等于负EAGAIN
258  否则res等于wait_event_interruptible_locked_irq - sleep until a condition gets true*@wq: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_INTERRUPTIBLE) until the(wqh, ticks)
266  如果timerfd_canceled(ctx)则
267  ticks等于0
268  expired等于0
269  res等于负ECANCELED
272  如果ticks
273  ticks等于ticks
275  如果expiredtintv
282  如果isalarm(ctx)则
283  ticks加等于alarm_forward_now( & alarm, tintv)减1
285  alarm_restart( & alarm)
286  否则
292  expired等于0
293  ticks等于0
295  spin_unlock_irq( & lock)
296  如果ticksres等于如果put_user - Write a simple value into user space(ticks, (u64__user * )buf)则负EFAULT否则ticks的长度
298  返回:res