enable sys_arch failed log Signed-off-by: Lemmy Huang <huangliming5@huawei.com> (cherry picked from commit 34b22f2f4f2cb538497e033b1eaf9cd4092a9527)
53 lines
2.1 KiB
Diff
53 lines
2.1 KiB
Diff
From dbb5652c661784b5bfd6d4e960f168fc89f11855 Mon Sep 17 00:00:00 2001
|
|
From: Lemmy Huang <huangliming5@huawei.com>
|
|
Date: Tue, 23 Jul 2024 11:22:21 +0800
|
|
Subject: [PATCH 2/2] enable sys_arch failed log
|
|
|
|
Signed-off-by: Lemmy Huang <huangliming5@huawei.com>
|
|
---
|
|
src/api/sys_arch.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/api/sys_arch.c b/src/api/sys_arch.c
|
|
index cb4716f..553a1c7 100644
|
|
--- a/src/api/sys_arch.c
|
|
+++ b/src/api/sys_arch.c
|
|
@@ -97,14 +97,14 @@ int thread_create(const char *name, unsigned id, thread_fn func, void *arg)
|
|
|
|
ret = pthread_create(&tid, NULL, func, arg);
|
|
if (ret != 0) {
|
|
- LWIP_DEBUGF(SYS_DEBUG, ("thread_create: pthread_create failed\n"));
|
|
+ LWIP_DEBUGF(SYS_DEBUG | GAZELLE_DEBUG_SERIOUS, ("thread_create: pthread_create failed\n"));
|
|
return ret;
|
|
}
|
|
|
|
SYS_FORMAT_NAME(thread_name, sizeof(thread_name), "%s_%02u", name, id);
|
|
ret = pthread_setname_np(tid, thread_name);
|
|
if (ret != 0) {
|
|
- LWIP_DEBUGF(SYS_DEBUG, ("thread_create: pthread_setname_np %s failed\n", thread_name));
|
|
+ LWIP_DEBUGF(SYS_DEBUG | GAZELLE_DEBUG_WARNING, ("thread_create: pthread_setname_np %s failed\n", thread_name));
|
|
}
|
|
return 0;
|
|
}
|
|
@@ -116,7 +116,7 @@ sys_thread_t sys_thread_new(const char *name, lwip_thread_fn function, void *arg
|
|
|
|
thread = (sys_thread_t)malloc(sizeof(*thread));
|
|
if (thread == NULL) {
|
|
- LWIP_DEBUGF(SYS_DEBUG, ("sys_thread_new: malloc sys_thread failed\n"));
|
|
+ LWIP_DEBUGF(SYS_DEBUG | GAZELLE_DEBUG_SERIOUS, ("sys_thread_new: malloc sys_thread failed\n"));
|
|
return NULL;
|
|
}
|
|
|
|
@@ -417,7 +417,7 @@ u8_t *sys_hugepage_malloc(const char *name, unsigned size)
|
|
SYS_FORMAT_NAME(memname, sizeof(memname), "%s_%d", name, rte_gettid());
|
|
mz = rte_memzone_reserve(memname, size, rte_socket_id(), 0);
|
|
if (mz == NULL) {
|
|
- LWIP_DEBUGF(SYS_DEBUG, ("sys_hugepage_malloc: failed to reserver memory for mempool[%s]\n", name));
|
|
+ LWIP_DEBUGF(SYS_DEBUG | GAZELLE_DEBUG_SERIOUS, ("sys_hugepage_malloc: failed to reserver memory for mempool[%s]\n", memname));
|
|
set_errno(ENOMEM);
|
|
return NULL;
|
|
}
|
|
--
|
|
2.33.0
|
|
|