函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:seq_lseek - ->llseek() method for sequential files.*@file: the file in question*@offset: new position*@whence: 0 for absolute, 1 for relative position* Ready-made ->f_op->llseek()

函数原型:loff_t seq_lseek(struct file *file, loff_t offset, int whence)

返回类型:loff_t

参数:

类型参数名称
struct file *file
loff_toffset
intwhence
312  m等于 needed for tty driver, and maybe others
313  retval等于负EINVAL
315  mutex_lock( & lock)
316  version等于f_version
318  :whence恒等于seek relative to current file position
319  offset加等于f_pos
321  :whence恒等于seek relative to beginning of file
322  如果offset小于0则退出
324  retval等于offset
325  如果offset不等于read_pos
326 retval等于traverse(m, offset)恒等于负EAGAIN循环
328  如果retval
330  f_pos等于0
331  read_pos等于0
332  version等于0
333  index等于0
334  count等于0
335  否则
336  read_pos等于offset
337  retval等于f_pos等于offset
339  否则
340  f_pos等于offset
343  f_version等于version
344  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
345  返回:retval
调用者
名称描述
tracing_lseek