代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/lwip 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 35300925c26ce9eba9f4f1c9a4181708da771392 Mon Sep 17 00:00:00 2001
From: Honggang LI <honggangli@163.com>
Date: Tue, 12 Jul 2022 10:15:36 +0800
Subject: [PATCH] Replace gettid() with syscall(SYS_gettid)
Remove gettid() to address a backport issue for gazelle library.
Signed-off-by: Honggang LI <honggangli@163.com>
---
src/include/arch/cc.h | 4 ++--
src/include/lwiplog.h | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/include/arch/cc.h b/src/include/arch/cc.h
index 222b0c9..10d667b 100644
--- a/src/include/arch/cc.h
+++ b/src/include/arch/cc.h
@@ -62,7 +62,7 @@ void alloc_memp_##name##_base(void) \
memp_pools[MEMP_##name] = &memp_ ## name; \
\
char mpname[MEMZONE_NAMESIZE] = {0}; \
- snprintf(mpname, MEMZONE_NAMESIZE, "%d_%s", gettid(), #name); \
+ snprintf(mpname, MEMZONE_NAMESIZE, "%d_%s", (int)syscall(SYS_gettid), #name); \
memp_memory_##name##_base = \
sys_hugepage_malloc(mpname, LWIP_MEM_ALIGN_BUFFER(__size)); \
memp_pools[MEMP_##name]->base = memp_memory_##name##_base; \
@@ -73,7 +73,7 @@ PER_THREAD uint8_t *variable_name; \
void alloc_memory_##variable_name(void) \
{ \
char mpname[MEMZONE_NAMESIZE] = {0}; \
- snprintf(mpname, MEMZONE_NAMESIZE, "%d_%s", gettid(), #variable_name); \
+ snprintf(mpname, MEMZONE_NAMESIZE, "%d_%s", (int)syscall(SYS_gettid), #variable_name); \
(variable_name) = \
sys_hugepage_malloc(mpname, LWIP_MEM_ALIGN_BUFFER(size)); \
}
diff --git a/src/include/lwiplog.h b/src/include/lwiplog.h
index 6fccac8..011ed21 100644
--- a/src/include/lwiplog.h
+++ b/src/include/lwiplog.h
@@ -35,13 +35,12 @@
#include <stdio.h>
#include <sys/syscall.h>
+#include <unistd.h>
#include <rte_log.h>
#include "lwipopts.h"
-extern int gettid(void);
-
#if USE_DPDK_LOG
#define LWIP_LOG_WARN LWIP_DBG_LEVEL_WARNING
--
2.31.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。