!1049 回退los_panic相关修改

Merge pull request !1049 from wangchen/0412_back
This commit is contained in:
openharmony_ci 2023-04-12 09:15:15 +00:00 committed by Gitee
commit 18d07a809a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 8 deletions

View File

@ -37,7 +37,6 @@
#include "los_mux.h" #include "los_mux.h"
#include "los_queue.h" #include "los_queue.h"
#include "los_sem.h" #include "los_sem.h"
#include "securec.h"
#if (LOSCFG_PLATFORM_HWI == 1) #if (LOSCFG_PLATFORM_HWI == 1)
#include "los_interrupt.h" #include "los_interrupt.h"
@ -96,8 +95,6 @@
#include "los_trace_pri.h" #include "los_trace_pri.h"
#endif #endif
#define BUFSIZE 256
/***************************************************************************** /*****************************************************************************
Function : LOS_Reboot Function : LOS_Reboot
Description : system exception, die in here, wait for watchdog. Description : system exception, die in here, wait for watchdog.
@ -113,14 +110,10 @@ LITE_OS_SEC_TEXT_INIT VOID LOS_Reboot(VOID)
LITE_OS_SEC_TEXT_INIT VOID LOS_Panic(const CHAR *fmt, ...) LITE_OS_SEC_TEXT_INIT VOID LOS_Panic(const CHAR *fmt, ...)
{ {
char buf[BUFSIZE] = { 0 };
va_list ap; va_list ap;
va_start(ap, fmt); va_start(ap, fmt);
int len = vsnprintf_s(buf, sizeof(buf), BUFSIZE - 1, fmt, ap); PRINT_ERR(fmt, ap);
va_end(ap); va_end(ap);
if (len > 0) {
PRINT_ERR("%s\n", buf);
}
OsDoExcHook(EXC_PANIC); OsDoExcHook(EXC_PANIC);
#if (LOSCFG_BACKTRACE_TYPE != 0) #if (LOSCFG_BACKTRACE_TYPE != 0)
LOS_BackTrace(); LOS_BackTrace();