fix:解决release1.0.1分支内核关闭中断后在写BUFF满了后卡住问题

主干存在该问题,release分支先合入

添加cnt==0以及关中断的判断条件,在符合这种情况时跳出死循环,避免卡住

Signed-off-by: wanghao-free <wanghao453@huawei.com>
This commit is contained in:
wanghao-free 2021-09-28 20:10:13 -07:00
parent a37c850d1b
commit 0d50fad855
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ STATIC VOID ConsoleOutput(const CHAR *str, UINT32 len)
for (;;) {
cnt = write(STDOUT_FILENO, str + writen, (size_t)toWrite);
if ((cnt < 0) || (toWrite == cnt)) {
if ((cnt < 0) || ((cnt == 0) && OS_INT_ACTIVE) || (toWrite == cnt)) {
break;
}
writen += cnt;