函数逻辑报告 |
Source Code:fs\select.c |
Create Date:2022-07-29 10:37:01 |
| Last Modify:2020-03-18 10:25:38 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:do_select
函数原型:static int do_select(int n, fd_set_bits *fds, struct timespec64 *end_time)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| int | n | |
| fd_set_bits * | fds | |
| struct timespec64 * | end_time |
| 481 | timed_out等于0 |
| 482 | slack等于0 |
| 483 | busy_flag等于如果net_busy_loop_on()则POLL_BUSY_LOOP否则0 |
| 484 | busy_start等于0 |
| 487 | retval等于max_select_fd(n, fds) |
| 494 | poll_initwait( & table) |
| 496 | 如果end_time且非 seconds 且非 nanoseconds 则 |
| 504 | retval等于0 |
| 505 | 循环 |
| 507 | bool can_busy_loop = false |
| 513 | bit等于1 |
| 519 | 如果all_bits恒等于0则 |
| 520 | i加等于BITS_PER_LONG |
| 521 | 继续下一循环 |
| 524 | 以j小于BITS_PER_LONG循环 |
| 531 | 如果file则 |
| 537 | 如果mask按位与POLLIN_SET且in按位与bit则 |
| 542 | 如果mask按位与POLLOUT_SET且out按位与bit则 |
| 547 | 如果mask按位与POLLEX_SET且ex按位与bit则 |
| 553 | 如果retval则 |
| 554 | can_busy_loop = false |
| 555 | busy_flag等于0 |
| 561 | 否则如果busy_flag按位与mask则can_busy_loop = true |
| 572 | cond_resched() |
| 574 | _qproc = NULL |
| 575 | 如果retval或timed_out或signal_pending(当前进程)则退出 |
| 577 | 如果error则 |
| 583 | 如果can_busy_loop且非need_resched()则 |
| 584 | 如果非busy_start则 |
| 585 | busy_start等于busy_loop_current_time() |
| 586 | 继续下一循环 |
| 588 | 如果非 poll/select we use the global sysctl_net_ll_poll value 则继续下一循环 |
| 591 | busy_flag等于0 |
| 608 | poll_freewait( & table) |
| 610 | 返回:retval |
| 名称 | 描述 |
|---|---|
| core_sys_select | We can actually return ERESTARTSYS instead of EINTR, but I'd* like to be certain this leads to no problems. So I return* EINTR just for safety.* Update: ERESTARTSYS breaks at least the xview clock binary, so |
| compat_core_sys_select | We can actually return ERESTARTSYS instead of EINTR, but I'd* like to be certain this leads to no problems. So I return* EINTR just for safety.* Update: ERESTARTSYS breaks at least the xview clock binary, so |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |