acassis commented on code in PR #14456:
URL: https://github.com/apache/nuttx/pull/14456#discussion_r1811156390
##########
drivers/syslog/syslog_write.c:
##########
@@ -37,6 +37,39 @@
* Private Functions
****************************************************************************/
+/****************************************************************************
+ * Name: syslog_safe_to_block
+ *
+ * Description:
+ * Check if it is safe to block for write. If not, the write defaults to a
+ * non-blocking method.
+ *
+ * Input Parameters:
+ * None.
+ *
+ * Returned Value:
+ * true if it is safe to block; false otherwise.
+ *
+ ****************************************************************************/
+
+static bool syslog_safe_to_block(void)
+{
+ FAR const struct tcb_s *rtcb;
+
+ if (up_interrupt_context() || sched_idletask())
+ {
+ return false;
+ }
+
+ rtcb = nxsched_self();
Review Comment:
Please include a comment above nxsched_self()
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]