This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new b1184370416 sched/critmon: Warn about the busy-wait time only above a 
positive limit.
b1184370416 is described below

commit b11843704167a7c2d65c00e352273da986916442
Author: Marco Casaroli <[email protected]>
AuthorDate: Tue Nov 3 21:42:57 2026 +0100

    sched/critmon: Warn about the busy-wait time only above a positive limit.
    
    CHECK_BUSYWAIT() is active for SCHED_CRITMONITOR_MAXTIME_BUSYWAIT >= 0,
    but the other CHECK_*() macros, SCHED_CRITMONITOR_MAXTIME_PANIC and
    Documentation/os/interrupts/critical_sections.rst give the warning only
    for a value > 0.  With the value 0 (statistics only), each busy wait
    longer than 0 gives a warning, and the console fills with "wait for
    critical section or spinlock too long".
    
    Make CHECK_BUSYWAIT() active only for a value > 0, as the others.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 sched/sched/sched_critmonitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sched/sched/sched_critmonitor.c b/sched/sched/sched_critmonitor.c
index 7f658e2f668..49d36fd56e5 100644
--- a/sched/sched/sched_critmonitor.c
+++ b/sched/sched/sched_critmonitor.c
@@ -70,7 +70,7 @@
 #  define CHECK_CSECTION(pid, elapsed)
 #endif
 
-#if CONFIG_SCHED_CRITMONITOR_MAXTIME_BUSYWAIT >= 0
+#if CONFIG_SCHED_CRITMONITOR_MAXTIME_BUSYWAIT > 0
 #  define CHECK_BUSYWAIT(pid, elapsed) \
      do \
        { \

Reply via email to