!756 fix: 修复重复执行内存用例导致系统卡死问题
Merge pull request !756 from Harylee/print
This commit is contained in:
commit
997e61ed53
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue