You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/07/17 14:31:28 UTC

[incubator-nuttx] 04/04: syslog: Remove the lock from syslog_default_write

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 19f269e54ba3f41403e02577f28c8c1d96e9ca67
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Thu Jul 14 15:50:37 2022 +0800

    syslog: Remove the lock from syslog_default_write
    
    to avoid the problem when is called from interrupt/signal handler
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/syslog/syslog_channel.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c
index 60cf185368..360d97d2d4 100644
--- a/drivers/syslog/syslog_channel.c
+++ b/drivers/syslog/syslog_channel.c
@@ -217,11 +217,7 @@ 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 sem_t sem = SEM_INITIALIZER(1);
-
-  nxsem_wait(&sem);
   up_puts(buffer);
-  nxsem_post(&sem);
 #endif
 
   UNUSED(channel);