函数逻辑报告 |
Source Code:fs\eventpoll.c |
Create Date:2022-07-29 10:50:59 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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.
函数原型:static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events, int maxevents, long timeout)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct eventpoll * | ep | |
struct epoll_event __user * | events | |
int | maxevents | |
long | timeout |
1808 | slack等于0 |
1809 | bool waiter = false |
1813 | lockdep_assert_irqs_enabled() |
1815 | 如果timeout大于0则 |
1816 | end_time等于ep_set_mstimeout(timeout) |
1818 | slack等于select_estimate_accuracy( & end_time) |
1821 | 否则如果timeout恒等于0则 |
1829 | timed_out等于1 |
1835 | 转到:send_events |
1838 | fetch_events : |
1844 | 如果eavail则转到:send_events |
1852 | ep_reset_busy_poll_napi_id(ep) |
1859 | 如果非waiter则 |
1860 | waiter = true |
1861 | init_waitqueue_entry( & wait, 当前进程) |
1863 | spin_lock_irq( & lock) |
1865 | spin_unlock_irq( & lock) |
1868 | 循环 |
1874 | set_current_state(睡眠态) |
1881 | 如果fatal_signal_pending(当前进程)则 |
1889 | 如果signal_pending(当前进程)则 |
1902 | send_events : |
1908 | 如果非res且eavail且非res等于ep_send_events(ep, events, maxevents)且非timed_out则转到:fetch_events |
1912 | 如果waiter则 |
1913 | spin_lock_irq( & lock) |
1914 | __remove_wait_queue( & Wait queue used by sys_epoll_wait() , & wait) |
1915 | spin_unlock_irq( & lock) |
1918 | 返回:res |
名称 | 描述 |
---|---|
do_epoll_wait | Implement the event wait interface for the eventpoll file. It is the kernel* part of the user space epoll_wait(2). |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |