xiaoxiang781216 commented on code in PR #8755:
URL: https://github.com/apache/nuttx/pull/8755#discussion_r1133468916


##########
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:
   ramlog_addchar may be called in the interrupt context. Since ramlog_addchar 
is implemented on top of ramlog_addbuf, ramlog_addbuf need support the 
interrupt context too.



-- 
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