Function report |
Source Code:fs\eventpoll.c |
Create Date:2022-07-28 20:19:08 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto:static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events, int maxevents, long timeout)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
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 | If timeout > 0 Then |
1816 | end_time = ep_set_mstimeout(timeout) |
1818 | slack = select_estimate_accuracy( & end_time) |
1821 | Else if timeout == 0 Then |
1829 | timed_out = 1 |
1835 | Go to send_events |
1838 | fetch_events : |
1844 | If eavail Then Go to send_events |
1852 | ep_reset_busy_poll_napi_id(ep) |
1859 | If Not waiter Then |
1860 | waiter = true |
1861 | init_waitqueue_entry( & wait, current process) |
1863 | spin_lock_irq( & lock) |
1865 | spin_unlock_irq( & lock) |
1868 | cycle |
1881 | If fatal_signal_pending(current process) Then |
1887 | If eavail Then Break |
1889 | If signal_pending(current process) Then |
1895 | timed_out = 1 |
1896 | Break |
1902 | send_events : |
1908 | If Not res && eavail && Not (res = ep_send_events(ep, events, maxevents)) && Not timed_out Then Go to fetch_events |
1912 | If waiter Then |
1913 | spin_lock_irq( & lock) |
1914 | __remove_wait_queue( & Wait queue used by sys_epoll_wait() , & wait) |
1915 | spin_unlock_irq( & lock) |
1918 | Return res |
Name | Describe |
---|---|
do_epoll_wait | Implement the event wait interface for the eventpoll file. It is the kernel* part of the user space epoll_wait(2). |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |