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,21 +77,26 @@ int syslog_putc(int ch)
|
|||
if (up_interrupt_context() || sched_idletask())
|
||||
{
|
||||
#if defined(CONFIG_SYSLOG_INTBUFFER)
|
||||
/* Buffer the character in the interrupt buffer. The interrupt buffer
|
||||
* will be flushed before the next normal, non-interrupt SYSLOG output.
|
||||
*/
|
||||
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
|
||||
/* 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().
|
||||
*/
|
||||
|
||||
DEBUGASSERT(g_syslog_channel->sc_force != NULL);
|
||||
|
||||
return g_syslog_channel->sc_force(ch);
|
||||
return syslog_add_intbuffer(ch);
|
||||
}
|
||||
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().
|
||||
*/
|
||||
|
||||
DEBUGASSERT(g_syslog_channel->sc_force != NULL);
|
||||
|
||||
return g_syslog_channel->sc_force(ch);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue