函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\select.c Create Date:2022-07-29 10:37:04
Last Modify:2020-03-18 10:25:38 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:do_sys_poll

函数原型:static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, struct timespec64 *end_time)

返回类型:int

参数:

类型参数名称
struct pollfd __user *ufds
unsigned intnfds
struct timespec64 *end_time
964  err等于负EFAULT
969  head等于stack_pps
970  walk等于head
971  todo等于nfds
973  如果nfds大于rlimit(RLIMIT_NOFILE)则返回:负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  循环
978  next = NULL
979  len等于len
980  如果非len退出
983  如果copy_from_user(entries, ufds + nfds - todo, sizeof(structpollfd) * len)则转到:out_fds
987  todo减等于len
988  如果非todo退出
991  len等于两数取小(todo, POLLFD_PER_PAGE)
992  walk等于next等于开辟内存
994  如果非walk
995  err等于负ENOMEM
996  转到:out_fds
1000  poll_initwait( & table)
1001  fdcount等于do_poll(head, & table, end_time)
1002  poll_freewait( & table)
1004 walk循环
1005  fds等于entries
1008 j小于len循环如果__put_user - Write a simple value into user space, with less checking(revents, & revents)则
1010  转到:out_fds
1013  err等于fdcount
1014  out_fds :
1015  walk等于next
1016 walk循环
1017  pos等于walk
1018  walk等于next
1019  释放内存
1022  返回:err
调用者
名称描述
do_restart_poll
SYSCALL_DEFINE3
SYSCALL_DEFINE5
COMPAT_SYSCALL_DEFINE5New compat syscall for 64 bit time_t