未验证 提交 60e77d0e 编写于 作者: H Harylee 提交者: Gitee

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

Signed-off-by: NHaryslee <lihao189@huawei.com>
上级 68b47758
......@@ -46,7 +46,7 @@
#include "los_excinfo_pri.h"
#endif
#include "los_exc_pri.h"
#include "los_sched_pri.h"
#define SIZEBUF 256
......@@ -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) && ((!OsPreemptable()) || (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.
先完成此消息的编辑!
想要评论请 注册