Gary-Hobson commented on code in PR #8755:
URL: https://github.com/apache/nuttx/pull/8755#discussion_r1133463931


##########
drivers/syslog/ramlog.c:
##########
@@ -267,13 +266,24 @@ static void ramlog_initbuf(void)
 #endif
 
 /****************************************************************************
- * Name: ramlog_addchar
+ * Name: ramlog_addbuf
  ****************************************************************************/
 
-static int ramlog_addchar(FAR struct ramlog_dev_s *priv, char ch)
+static ssize_t ramlog_addbuf(FAR struct ramlog_dev_s *priv,
+                             FAR const char *buffer, size_t len)
 {
+  int readers_waken;
   irqstate_t flags;
-  size_t nexthead;
+  int space;
+  int remain;
+  int head;
+  int ret;
+
+  ret = nxmutex_lock(&priv->rl_lock);

Review Comment:
   I have a question about this, but I haven't changed it here, and it was 
included in the original addbuf.
   In the original addbuf, both nxmutex_lock and enter_critical_section are 
used. Is this necessary?
   I don't quite understand why the protection needs to be added twice.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to