提交 997e61ed 编写于 作者: O openharmony_ci 提交者: Gitee

!756 fix: 修复重复执行内存用例导致系统卡死问题

Merge pull request !756 from Harylee/print
......@@ -47,6 +47,7 @@
#include "los_excinfo_pri.h"
#endif
#include "los_exc_pri.h"
#include "los_sched_pri.h"
#define SIZEBUF 256
......@@ -94,7 +95,7 @@ STATIC VOID ConsoleOutput(const CHAR *str, UINT32 len)
for (;;) {
cnt = write(STDOUT_FILENO, str + written, (size_t)toWrite);
if ((cnt < 0) || ((cnt == 0) && (OS_INT_ACTIVE)) || (toWrite == cnt)) {
if ((cnt < 0) || ((cnt == 0) && ((!OsPreemptable()) || (OS_INT_ACTIVE))) || (toWrite == cnt)) {
break;
}
written += cnt;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册