Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Implement the event wait interface for the eventpoll file. It is the kernel* part of the user space epoll_wait(2).

Proto:static int do_epoll_wait(int epfd, struct epoll_event __user *events, int maxevents, int timeout)

Type:int

Parameter:

TypeParameterName
intepfd
struct epoll_event __user *events
intmaxevents
inttimeout
2246  If maxevents <= 0 || maxevents > EP_MAX_EVENTS Then Return -EINVAL
2250  If Not access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.(events, maxevents * sizeof(structepoll_event)) Then Return -EFAULT
2254  f = fdget(epfd)
2255  If Not file Then Return -EBADF
2262  error = -EINVAL
2263  If Not is_file_epoll(file) Then Go to error_fput
2270  ep = needed for tty driver, and maybe others
2273  error = p_poll - Retrieves ready events, and delivers them to the caller supplied* event buffer.*@ep: Pointer to the eventpoll context.*@events: Pointer to the userspace buffer where the ready events should be* stored.
2275  error_fput :
2276  fdput(f)
2277  Return error
Caller
NameDescribe
SYSCALL_DEFINE4
SYSCALL_DEFINE6Implement the event wait interface for the eventpoll file. It is the kernel* part of the user space epoll_pwait(2).
COMPAT_SYSCALL_DEFINE6