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/25 16:39:03 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6512: driver/syslog:sched lock in syslog to prevent garbled print from multi-thread

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


##########
drivers/syslog/vsyslog.c:
##########
@@ -79,6 +79,10 @@ int nx_vsyslog(int priority, FAR const IPTR char *fmt, FAR va_list *ap)
 #endif
 #endif
 
+#ifdef CONFIG_SYSLOG_SCHEDLOCK
+  sched_lock();

Review Comment:
   sched_lock can't protect in SMP case, so you have to use critical section here.



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