You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2021/09/18 10:33:57 UTC
[incubator-nuttx] 05/05: drivers/syslog: Call up_puts in
syslog_default_write instad up_putc
This is an automated email from the ASF dual-hosted git repository.
gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 174b2403258cbf0e063ac389beeedcd09b8a0b1a
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Sep 17 11:56:21 2021 +0800
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 <xi...@xiaomi.com>
---
drivers/syslog/syslog_channel.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c
index bff3d8d..5454087 100644
--- a/drivers/syslog/syslog_channel.c
+++ b/drivers/syslog/syslog_channel.c
@@ -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