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

Merge pull request !640 from zhangfanfan2/master
This commit is contained in:
openharmony_ci 2021-09-29 02:48:49 +00:00 committed by Gitee
commit ee72b21aff
1 changed files with 1 additions and 1 deletions

View File

@ -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;