From 6e02f3a31d118e85906bf52e84b14e8ecf9e1b97 Mon Sep 17 00:00:00 2001 From: yinshengkai Date: Mon, 22 Apr 2024 18:04:14 +0800 Subject: [PATCH] sched: modify dump_stack log level Keep the log level consistent with assert Signed-off-by: yinshengkai --- libs/libc/sched/sched_dumpstack.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libs/libc/sched/sched_dumpstack.c b/libs/libc/sched/sched_dumpstack.c index 6ac50835fa..fec6a729d3 100644 --- a/libs/libc/sched/sched_dumpstack.c +++ b/libs/libc/sched/sched_dumpstack.c @@ -28,7 +28,7 @@ #include #include -#include +#include /**************************************************************************** * Pre-processor Definitions @@ -79,20 +79,19 @@ void sched_dumpstack(pid_t tid) format, DUMP_WIDTH, address[i]); if (i == size - 1 || ret % DUMP_LINESZ == 0) { - syslog(LOG_EMERG, "backtrace|%2d:%s\n", tid, line); + _alert("backtrace|%2d:%s\n", tid, line); ret = 0; } } #else if (skip == 0) { - syslog(LOG_EMERG, "backtrace:\n"); + _alert("backtrace:\n"); } for (i = 0; i < size; i++) { - syslog(LOG_EMERG, "[%2d] [<%p>] %pS\n", - tid, address[i], address[i]); + _alert("[%2d] [<%p>] %pS\n", tid, address[i], address[i]); } #endif }