Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\select.c Create Date:2022-07-28 20:07:05
Last Modify:2020-03-18 10:25:38 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_sys_poll

Proto:static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, struct timespec64 *end_time)

Type:int

Parameter:

TypeParameterName
struct pollfd __user *ufds
unsigned intnfds
struct timespec64 *end_time
964  err = -EFAULT
969  head = stack_pps
970  walk = head
971  todo = nfds
973  If nfds > rlimit(RLIMIT_NOFILE) Then Return -EINVAL
976  len = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsignedint, nfds, N_STACK_PPS)
977  cycle
978  next = NULL
979  len = len
980  If Not len Then Break
983  If copy_from_user(entries, ufds + nfds - todo, sizeof(structpollfd) * len) Then Go to out_fds
987  todo -= len
988  If Not todo Then Break
991  len = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(todo, POLLFD_PER_PAGE)
992  walk = next = Allocation memory
994  If Not walk Then
995  err = -ENOMEM
996  Go to out_fds
1000  poll_initwait( & table)
1001  fdcount = do_poll(head, & table, end_time)
1002  poll_freewait( & table)
1004  When walk cycle
1005  fds = entries
1008  When j < len cycle If Write a simple value into user space, with less checking(revents, & revents) Then
1010  Go to out_fds
1013  err = fdcount
1014  out_fds :
1015  walk = next
1016  When walk cycle
1017  pos = walk
1018  walk = next
1019  kfree(pos)
1022  Return err
Caller
NameDescribe
do_restart_poll
SYSCALL_DEFINE3
SYSCALL_DEFINE5
COMPAT_SYSCALL_DEFINE5New compat syscall for 64 bit time_t