drivers/syslog: Call up_puts in syslog_default_write instad up_putc

since some drivers(e.g. semihosting) have more fast implementation.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2021-09-17 11:56:21 +08:00 committed by Gustavo Henrique Nihei
parent 75a119ac1c
commit 174b240325

View File

@ -161,14 +161,8 @@ static ssize_t syslog_default_write(FAR struct syslog_channel_s *channel,
FAR const char *buffer, size_t buflen)
{
#if defined(CONFIG_ARCH_LOWPUTC)
size_t nwritten;
nxsem_wait(&g_syslog_default_sem);
for (nwritten = 0; nwritten < buflen; nwritten++)
{
up_putc(buffer[nwritten]);
}
up_puts(buffer);
nxsem_post(&g_syslog_default_sem);
#endif