Skip to content

Commit c58d893

Browse files
authored
[kernel][idle] _has_defunct_thread函数增加条件编译
_has_defunct_thread函数增加条件编译,防止没有开启heap时报警
1 parent 19de22f commit c58d893

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/idle.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ rt_err_t rt_thread_idle_delhook(void (*hook)(void))
127127

128128
#endif
129129

130+
#ifdef RT_USING_HEAP
130131
/* Return whether there is defunctional thread to be deleted. */
131132
rt_inline int _has_defunct_thread(void)
132133
{
@@ -140,6 +141,7 @@ rt_inline int _has_defunct_thread(void)
140141

141142
return l->next != l;
142143
}
144+
#endif
143145

144146
/**
145147
* @ingroup Thread

0 commit comments

Comments
 (0)