函数逻辑报告 |
Source Code:fs\eventpoll.c |
Create Date:2022-07-29 10:50:58 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Must be called with "mtx" held.
函数原型:static int ep_insert(struct eventpoll *ep, const struct epoll_event *event, struct file *tfile, int fd, int full_check)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
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 | 如果此条件成立可能性小(为编译器优化)(user_watches >= Maximum number of epoll watched descriptors, per user )则返回:负ENOSPC |
1493 | 初始化链表头 |
1494 | 初始化链表头 |
1495 | 初始化链表头 |
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 | 如果error则转到:error_create_wakeup_source |
1505 | 否则 |
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. |
1532 | 加自旋锁 |
1533 | 添加RCU链表项 |
1534 | 自旋锁解锁 |
1540 | ep_rbtree_insert(ep, epi) |
1544 | 如果full_check且verse_path_check - The tfile_check_list is list of file *, which have* links that are proposed to be newly added则转到:error_remove_epi |
1551 | ep_set_busy_poll_napi_id(epi) |
1555 | 添加链表项 |
1570 | 如果pwake则ep_poll_safewake( & Wait queue used by file->poll() ) |
1573 | 返回:0 |
1575 | error_remove_epi : |
1576 | 加自旋锁 |
1577 | 删除不需要重新初始化的列表项 |
1578 | 自旋锁解锁 |
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 : |
1598 | error_create_wakeup_source : |
1601 | 返回:error |
名称 | 描述 |
---|---|
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. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |