Skip to content

Commit 81d5bf0

Browse files
committed
feat(kernel): Check interrupt-disabled context in RT_DEBUG_SCHEDULER_AVAILABLE
1 parent 11a1348 commit 81d5bf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/rtthread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ do \
870870
{ \
871871
if (need_check) \
872872
{ \
873-
if (rt_critical_level() != 0) \
873+
if ((rt_critical_level() != 0) || rt_hw_interrupt_is_disabled()) \
874874
{ \
875875
rt_kprintf("Function[%s]: scheduler is not available\n", \
876876
__FUNCTION__); \

0 commit comments

Comments
 (0)