1 Star 0 Fork 32

misaka00251/gazelle

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0080-fix-proc-can-not-exit-due-to-lack-of-mem-startup-fai.patch 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
吴昌盛 提交于 2022-09-05 15:52 . backport bugifx and doc
From 5d10ccf130b742f4e910568b642ac351a489c072 Mon Sep 17 00:00:00 2001
From: wu-changsheng <wuchangsheng2@huawei.com>
Date: Fri, 2 Sep 2022 19:26:05 +0800
Subject: [PATCH 17/20] fix proc can not exit due to lack of mem startup fail
---
src/lstack/core/lstack_protocol_stack.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
index 4f1ad41..3009286 100644
--- a/src/lstack/core/lstack_protocol_stack.c
+++ b/src/lstack/core/lstack_protocol_stack.c
@@ -373,10 +373,12 @@ static struct protocol_stack *stack_thread_init(uint16_t queue_id)
struct protocol_stack *stack = malloc(sizeof(*stack));
if (stack == NULL) {
LSTACK_LOG(ERR, LSTACK, "malloc stack failed\n");
+ sem_post(&stack_group->thread_phase1);
return NULL;
}
if (init_stack_value(stack, queue_id) != 0) {
+ sem_post(&stack_group->thread_phase1);
free(stack);
return NULL;
}
@@ -389,6 +391,7 @@ static struct protocol_stack *stack_thread_init(uint16_t queue_id)
if (use_ltran()) {
if (client_reg_thrd_ring() != 0) {
+ sem_post(&stack_group->thread_phase1);
free(stack);
return NULL;
}
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/misaka00251/gazelle.git
git@gitee.com:misaka00251/gazelle.git
misaka00251
gazelle
gazelle
master

搜索帮助