From 3b883d38288c999af0d818e433277f8a679530f2 Mon Sep 17 00:00:00 2001 From: zhangfanfan2 Date: Fri, 25 Dec 2020 10:10:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=B3=BB=E7=BB=9F=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=97=B6=EF=BC=8C=E7=94=B1=E4=BA=8Econsole=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E9=97=AE=E9=A2=98=EF=BC=8C=E5=AF=BC=E8=87=B4=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=BC=82=E5=B8=B8=E4=BF=A1=E6=81=AF=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/common/console.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/common/console.c b/kernel/common/console.c index ff782eaf..a3bc3b73 100644 --- a/kernel/common/console.c +++ b/kernel/common/console.c @@ -1626,6 +1626,7 @@ VOID OsWaitConsoleSendTaskPend(UINT32 taskID) UINT32 i; CONSOLE_CB *console = NULL; LosTaskCB *taskCB = NULL; + INT32 waitTime = 30000; /* 30000: 30 seconds*/ for (i = 0; i < CONSOLE_NUM; i++) { console = g_console[i]; @@ -1638,8 +1639,9 @@ VOID OsWaitConsoleSendTaskPend(UINT32 taskID) } taskCB = OS_TCB_FROM_TID(console->sendTaskID); - while ((taskCB->taskEvent == NULL) && (taskID != console->sendTaskID)) { + while ((waitTime > 0) && (taskCB->taskEvent == NULL) && (taskID != console->sendTaskID)) { LOS_Mdelay(1); /* 1: wait console task pend */ + --waitTime; } } }