From 3dfbb348c3bf468a1c887dd013ca8c274ef9047c Mon Sep 17 00:00:00 2001 From: Ahreum Jeong Date: Thu, 19 Jan 2017 10:12:54 +0900 Subject: [PATCH] Fix logm for stackdump and interrupt status Stackdump messages are not shown on assertion Because logm's print buffer can't be flushed after assert. These messages should be delivered with low output directly. Change-Id: Ifaca4b60bed8999307672d8905e4c53cbafa2072 --- os/logm/logm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os/logm/logm.c b/os/logm/logm.c index 9cc3428..85db778 100644 --- a/os/logm/logm.c +++ b/os/logm/logm.c @@ -39,7 +39,7 @@ int logm_internal(int priority, const char *fmt, va_list ap) int ret = 0; buffer_state_t op; - if (g_logm_isready) { + if (g_logm_isready && !up_interrupt_context()) { flags = irqsave(); if (g_logm_count < LOGM_RSVBUF_COUNT) { @@ -76,7 +76,7 @@ int logm_internal(int priority, const char *fmt, va_list ap) irqrestore(flags); } else { - /* Low Output: Sytem is not yet completely ready */ + /* Low Output: Sytem is not yet completely ready or this is called from interrupt handler */ #ifdef CONFIG_ARCH_LOWPUTC struct lib_outstream_s strm; lib_lowoutstream(&strm); -- 2.7.4