diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c index 04a3a80057..44a81a5d81 100644 --- a/drivers/syslog/syslog_channel.c +++ b/drivers/syslog/syslog_channel.c @@ -31,6 +31,7 @@ #include #include +#include #ifdef CONFIG_RAMLOG_SYSLOG # include @@ -217,7 +218,13 @@ static ssize_t syslog_default_write(FAR struct syslog_channel_s *channel, FAR const char *buffer, size_t buflen) { #if defined(CONFIG_ARCH_LOWPUTC) + static mutex_t lock = NXMUTEX_INITIALIZER; + + nxmutex_lock(&lock); + up_nputs(buffer, buflen); + + nxmutex_unlock(&lock); #endif UNUSED(channel);