misc: flush syslog before possible long time cost coredump

When coredump to mtd, it maybe cost lots of time, do flush syslog can
make user access all log when coredump processing, should be better.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
buxiasen 2024-09-20 20:15:48 +08:00 committed by Xiang Xiao
parent 4b315b3606
commit ca45ad69bd
1 changed files with 6 additions and 1 deletions

View File

@ -742,6 +742,11 @@ static void dump_fatal_info(FAR struct tcb_s *rtcb,
#if defined(CONFIG_BOARD_COREDUMP_SYSLOG) || \
defined(CONFIG_BOARD_COREDUMP_BLKDEV)
/* Flush previous SYSLOG data before possible long time coredump */
syslog_flush();
/* Dump core information */
# ifdef CONFIG_BOARD_COREDUMP_FULL