提交 9726ba11 编写于 作者: Z zff

fix: 中断中调用PRINTK概率卡死,导致系统不能正常响应中断

当console层的打印缓冲buffer满且打印任务被饿死时,函数ConsoleOutput会出现在for循环中
不退出的情况,导致中断打印时卡死

close: #I4C9GC
Signed-off-by: Nzff <zhangfanfan2@huawei.com>
Change-Id: I70b9d7c848dce7d351c5679e7b08049df27a6f10
上级 7d7cff4c
......@@ -94,7 +94,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.
先完成此消息的编辑!
想要评论请 注册