You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/06/13 11:03:42 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6414: mutex: Revert part of the changes introduced by b88a8cf39ff1019ad787c4316b22ce29c7daa2dc

xiaoxiang781216 commented on code in PR #6414:
URL: https://github.com/apache/incubator-nuttx/pull/6414#discussion_r895593423


##########
drivers/syslog/syslog_device.c:
##########
@@ -120,6 +123,63 @@ static const uint8_t g_syscrlf[2] =
  * Private Functions
  ****************************************************************************/
 
+/****************************************************************************
+ * Name: syslog_dev_takesem
+ ****************************************************************************/
+
+static inline int syslog_dev_takesem(FAR struct syslog_dev_s *syslog_dev)

Review Comment:
   it's better to add new function to check whether the caller already hold the lock and then return the error directly. Since syslog_device.c is part of kernel, it isn't good to dup the same logic again.



-- 
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-unsubscribe@nuttx.apache.org

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