20 Star 0 Fork 32

openEuler-RISC-V/gazelle

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0157-move-select_thread_path-after-posix_api_init.patch 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
From bd238ab678150c216d672409a5ddb4b7dd778fec Mon Sep 17 00:00:00 2001
From: kircher <majun65@huawei.com>
Date: Fri, 16 Dec 2022 16:53:21 +0800
Subject: [PATCH] move select_thread_path after posix_api_init
---
src/lstack/api/lstack_wrap.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/lstack/api/lstack_wrap.c b/src/lstack/api/lstack_wrap.c
index 2eeda6b..d976f74 100644
--- a/src/lstack/api/lstack_wrap.c
+++ b/src/lstack/api/lstack_wrap.c
@@ -50,18 +50,21 @@ bool select_thread_path(void);
static enum KERNEL_LWIP_PATH select_path(int fd)
{
- if (!select_thread_path()) {
- return PATH_KERNEL;
- }
-
if (unlikely(posix_api == NULL)) {
- /* posix api maybe call before gazelle init */
+ /*
+ * posix api maybe call before gazelle init
+ * So, we must call posix_api_init at the head of select_path
+ */
if (posix_api_init() != 0) {
LSTACK_PRE_LOG(LSTACK_ERR, "posix_api_init failed\n");
}
return PATH_KERNEL;
}
+ if (!select_thread_path()) {
+ return PATH_KERNEL;
+ }
+
if (unlikely(posix_api->ues_posix)) {
return PATH_KERNEL;
}
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-risc-v/gazelle.git
git@gitee.com:openeuler-risc-v/gazelle.git
openeuler-risc-v
gazelle
gazelle
master

搜索帮助