drivers/syslog/syslog_putc.c: call sc_force in idle task even interrupt buffer enabled. The following cases may hang randomly in the bring up phase: (1) boot up process and (2) suspend/resume process. Either case runs in the idle task context, so it's difficult to debug the hang issue if these output go through the interrupt buffer.
This commit is contained in:
parent
16909c80a3
commit
e3f23b5bca
|
@ -77,12 +77,17 @@ int syslog_putc(int ch)
|
|||
if (up_interrupt_context() || sched_idletask())
|
||||
{
|
||||
#if defined(CONFIG_SYSLOG_INTBUFFER)
|
||||
if (up_interrupt_context())
|
||||
{
|
||||
/* Buffer the character in the interrupt buffer. The interrupt buffer
|
||||
* will be flushed before the next normal, non-interrupt SYSLOG output.
|
||||
*/
|
||||
|
||||
return syslog_add_intbuffer(ch);
|
||||
#else
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
/* Force the character to the SYSLOG device immediately (if possible).
|
||||
* This means that the interrupt data may not be in synchronization
|
||||
* with output data that may have been buffered by sc_putc().
|
||||
|
@ -91,7 +96,7 @@ int syslog_putc(int ch)
|
|||
DEBUGASSERT(g_syslog_channel->sc_force != NULL);
|
||||
|
||||
return g_syslog_channel->sc_force(ch);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue