nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #1023: Fix setlogmask() not to use enter_critical_section() in protected build
Date Mon, 11 May 2020 04:28:02 GMT

xiaoxiang781216 commented on a change in pull request #1023:
URL: https://github.com/apache/incubator-nuttx/pull/1023#discussion_r422773452



##########
File path: libs/libc/syslog/lib_setlogmask.c
##########
@@ -91,17 +96,29 @@ uint8_t g_syslog_mask = LOG_ALL;
 int setlogmask(int mask)
 {
   uint8_t oldmask;
+
+#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)

Review comment:
       The better fix is either:
   1.remove the critical section or
   2.replace with mutex/semphare
   The mix just make the logic more complex and unmaintainable




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

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



Mime
View raw message