mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
syslog: Enable is partial, crippled version of syslog_flush(); arch/: Call syslog_flush() from assertion handling logic.
This commit is contained in:
@@ -77,6 +77,10 @@
|
||||
static void _up_assert(int errorcode) noreturn_function;
|
||||
static void _up_assert(int errorcode)
|
||||
{
|
||||
/* Flush any buffered SYSLOG data */
|
||||
|
||||
(void)syslog_flush();
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (g_current_regs || this_task()->pid == 0)
|
||||
@@ -139,6 +143,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
||||
|
||||
board_autoled_on(LED_ASSERTION);
|
||||
|
||||
/* Flush any buffered SYSLOG data (prior to the assertion) */
|
||||
|
||||
(void)syslog_flush();
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
_alert("Assertion failed at file:%s line: %d task: %s\n",
|
||||
filename, lineno, rtcb->name);
|
||||
@@ -155,6 +163,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
||||
(void)usbtrace_enumerate(assert_tracecallback, NULL);
|
||||
#endif
|
||||
|
||||
/* Flush any buffered SYSLOG data (from the above) */
|
||||
|
||||
(void)syslog_flush();
|
||||
|
||||
#ifdef CONFIG_BOARD_CRASHDUMP
|
||||
board_crashdump(up_getsp(), this_task(), filename, lineno);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user