diff --git a/include/rtthread.h b/include/rtthread.h index 08c57f58101..3bf8d434b0a 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -870,7 +870,7 @@ do \ { \ if (need_check) \ { \ - if (rt_critical_level() != 0) \ + if ((rt_critical_level() != 0) || rt_hw_interrupt_is_disabled()) \ { \ rt_kprintf("Function[%s]: scheduler is not available\n", \ __FUNCTION__); \