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

commit 7edd756712fbf50b260eb0d0117ced7a4c86e6cc
Author: ganjing <[email protected]>
AuthorDate: Fri Aug 21 17:59:47 2026 +0800

    arch/risc-v: fix circular include that breaks critmon build
    
    Enabling CONFIG_SCHED_CRITMONITOR_MAXTIME_IRQDISABLE on RISC-V fails
    to compile because arch/mode.h includes nuttx/irq.h, creating a
    circular dependency that leaves up_irq_save() undefined at the point
    of use. Remove the unnecessary reverse include and add the missing
    direct stdbool.h dependency.
    
    Assisted-By: mimo-v2.6-pro
    Co-authored-by: ouyangxiangzhen <[email protected]>
    Signed-off-by: Gan Jing <[email protected]>
    Signed-off-by: ouyangxiangzhen <[email protected]>
---
 arch/risc-v/include/irq.h  | 1 +
 arch/risc-v/include/mode.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/risc-v/include/irq.h b/arch/risc-v/include/irq.h
index 29c298bbb1c..f7ebba90ee1 100644
--- a/arch/risc-v/include/irq.h
+++ b/arch/risc-v/include/irq.h
@@ -36,6 +36,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <stdbool.h>
 
 #include <arch/csr.h>
 #include <arch/chip/irq.h>
diff --git a/arch/risc-v/include/mode.h b/arch/risc-v/include/mode.h
index 2c81c008b65..7d869cfb024 100644
--- a/arch/risc-v/include/mode.h
+++ b/arch/risc-v/include/mode.h
@@ -28,7 +28,6 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include <nuttx/irq.h>
 
 /****************************************************************************
  * Pre-processor Definitions

Reply via email to