mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
drivers/syslog: Call up_puts instead up_putc one by one
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
61dff1c125
commit
8254ad9159
@@ -218,14 +218,9 @@ static ssize_t syslog_default_write(FAR struct syslog_channel_s *channel,
|
|||||||
{
|
{
|
||||||
#if defined(CONFIG_ARCH_LOWPUTC)
|
#if defined(CONFIG_ARCH_LOWPUTC)
|
||||||
static sem_t sem = SEM_INITIALIZER(1);
|
static sem_t sem = SEM_INITIALIZER(1);
|
||||||
size_t nwritten;
|
|
||||||
|
|
||||||
nxsem_wait(&sem);
|
nxsem_wait(&sem);
|
||||||
for (nwritten = 0; nwritten < buflen; nwritten++)
|
up_puts(buffer);
|
||||||
{
|
|
||||||
up_putc(buffer[nwritten]);
|
|
||||||
}
|
|
||||||
|
|
||||||
nxsem_post(&sem);
|
nxsem_post(&sem);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user