fix: 修复重复执行内存用例导致系统卡死问题同步
Signed-off-by: Haryslee <lihao189@huawei.com>
This commit is contained in:
parent
68b477588f
commit
60e77d0ea7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue