Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:No kernel lock held - fine

Proto:static __poll_t pipe_poll(struct file *filp, poll_table *wait)

Type:__poll_t

Parameter:

TypeParameterName
struct file *filp
poll_table *wait
641  pipe = needed for tty driver, and maybe others
650  poll_wait(filp, & wait, wait)
657  head = READ_ONCE(head)
658  tail = READ_ONCE(tail)
660  mask = 0
661  If f_mode & le is open for reading Then
662  If Not pipe_empty - Return true if the pipe is empty*@head: The pipe ring head pointer*@tail: The pipe ring tail pointer Then mask |= Epoll event masks | EPOLLRDNORM
664  If Not writers && f_version != w_counter Then mask |= EPOLLHUP
668  If f_mode & le is open for writing Then
669  If Not pipe_full - Return true if the pipe is full*@head: The pipe ring head pointer*@tail: The pipe ring tail pointer*@limit: The maximum amount of slots available. Then mask |= EPOLLOUT | EPOLLWRNORM
675  If Not readers Then mask |= EPOLLERR
679  Return mask