提交 0d50fad8 编写于 作者: W wanghao-free

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

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

添加cnt==0以及关中断的判断条件,在符合这种情况时跳出死循环,避免卡住
Signed-off-by: Nwanghao-free <wanghao453@huawei.com>
上级 a37c850d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册