1 Star 0 Fork 32

shafeipaozi/gazelle

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0031-epoll-fix-epollet-mode-error.patch 1.60 KB
一键复制 编辑 原始数据 按行查看 历史
yinbin6 提交于 2023-11-04 11:56 . sync bond6
From c6cca5f100c09769a5d260e729f4c149be964ea4 Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Sat, 28 Oct 2023 20:17:26 +0800
Subject: [PATCH] epoll: fix epollet mode error
---
src/lstack/api/lstack_epoll.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/lstack/api/lstack_epoll.c b/src/lstack/api/lstack_epoll.c
index d1fb209..a711ae3 100644
--- a/src/lstack/api/lstack_epoll.c
+++ b/src/lstack/api/lstack_epoll.c
@@ -468,22 +468,22 @@ int32_t epoll_lwip_event_nolock(struct wakeup_poll *wakeup, struct epoll_event *
continue;
}
+ events[event_num].events = sock->events & sock->epoll_events;
+ events[event_num].data = sock->ep_data;
+ event_num++;
+
if (sock->epoll_events & EPOLLET) {
list_del_node_null(node);
sock->events = 0;
}
/* EPOLLONESHOT: generate event after epoll_ctl add/mod event again
- epoll_event set 0 avoid generating event util epoll_ctl set epoll_event a valu */
+ epoll_event set 0 avoid generating event util epoll_ctl reset epoll_event */
if (sock->epoll_events & EPOLLONESHOT) {
list_del_node_null(node);
sock->epoll_events = 0;
}
- events[event_num].events = sock->events & sock->epoll_events;
- events[event_num].data = sock->ep_data;
- event_num++;
-
if (event_num >= maxevents) {
/* move list head after the current node, and start traversing from this node next time */
list_del_node_null(&wakeup->event_list);
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shafeipaozi/gazelle.git
git@gitee.com:shafeipaozi/gazelle.git
shafeipaozi
gazelle
gazelle
master

搜索帮助