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:Must be called with "mtx" held.
Proto:static int ep_insert(struct eventpoll *ep, const struct epoll_event *event, struct file *tfile, int fd, int full_check)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct eventpoll * | ep | |
const struct epoll_event * | event | |
struct file * | tfile | |
int | fd | |
int | full_check |
1478 | pwake = 0 |
1484 | lockdep_assert_irqs_enabled() |
1487 | If Value for the false possibility is greater at compile time(user_watches >= Maximum number of epoll watched descriptors, per user ) Then Return -ENOSPC |
1489 | If Not (epi = kmem_cache_alloc(Slab cache used to allocate "struct epitem" , GFP_KERNEL)) Then Return -ENOMEM |
1496 | The "container" of this item = ep |
1500 | Works together "struct eventpoll"->ovflist in keeping the* single linked chain of items. = EP_UNACTIVE_PTR |
1502 | error = ep_create_wakeup_source(epi) |
1503 | If error Then Go to error_create_wakeup_source |
1505 | Else |
1511 | init_poll_funcptr( & pt, ep_ptable_queue_proc) |
1520 | revents = Differs from ep_eventpoll_poll() in that internal callers already have* the ep->mtx so we need to start from depth=1, such that mutex_lock_nested()* is correctly annotated. |
1528 | If Number of active wait queue attached to poll operations < 0 Then Go to error_unregister |
1540 | ep_rbtree_insert(ep, epi) |
1544 | If full_check && verse_path_check - The tfile_check_list is list of file *, which have* links that are proposed to be newly added Then Go to error_remove_epi |
1551 | ep_set_busy_poll_napi_id(epi) |
1554 | If revents && Not Tells us if the item is currently linked Then |
1570 | If pwake Then ep_poll_safewake( & Wait queue used by file->poll() ) |
1573 | Return 0 |
1575 | error_remove_epi : |
1580 | rb_erase_cached( & RB tree node links this structure to the eventpoll RB tree , & RB tree root used to store monitored fd structs ) |
1582 | error_unregister : |
1592 | If Tells us if the item is currently linked Then list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list. |
1598 | error_create_wakeup_source : |
1601 | Return error |
Name | Describe |
---|---|
SYSCALL_DEFINE4 | The following function implements the controller interface for* the eventpoll file that enables the insertion/removal/change of* file descriptors inside the interest set. |
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 |