mirror of
https://github.com/apache/nuttx.git
synced 2026-02-06 04:22:26 +08:00
syslog/rpmsg: disable force put char to lower putc
if rpmsg triggers force flushing when the master core provides lower putc, characters will be duplicated caused by SYSLOG_DEFAULT also send the char to lower half. in this PR, we disable force put char to lower putc if CONFIG_SYSLOG_DEFAULT is enabled Signed-off-by: chao an <anchao.archer@bytedance.com>
This commit is contained in:
@@ -245,7 +245,7 @@ static void syslog_rpmsg_addbuf(FAR struct syslog_rpmsg_s *priv,
|
||||
|
||||
if (priv->flush)
|
||||
{
|
||||
#if defined(CONFIG_ARCH_LOWPUTC)
|
||||
#if defined(CONFIG_ARCH_LOWPUTC) && !defined(CONFIG_SYSLOG_DEFAULT)
|
||||
up_nputs(buffer, len);
|
||||
#endif
|
||||
priv->flush += len;
|
||||
@@ -394,13 +394,15 @@ int syslog_rpmsg_flush(FAR syslog_channel_t *channel)
|
||||
priv->flush = priv->tail;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ARCH_LOWPUTC) && !defined(CONFIG_SYSLOG_DEFAULT)
|
||||
while (priv->flush < priv->head)
|
||||
{
|
||||
#if defined(CONFIG_ARCH_LOWPUTC)
|
||||
up_putc(priv->buffer[SYSLOG_RPMSG_FLUSHOFF(priv)]);
|
||||
#endif
|
||||
priv->flush++;
|
||||
}
|
||||
#else
|
||||
priv->flush = priv->head;
|
||||
#endif
|
||||
|
||||
leave_critical_section(flags);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user