[kernel][idle] _has_defunct_thread函数增加条件编译

_has_defunct_thread函数增加条件编译,防止没有开启heap时报警
This commit is contained in:
Meco Jianting Man 2021-05-22 17:21:42 +08:00 committed by GitHub
parent 19de22f485
commit c58d893c1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -127,6 +127,7 @@ rt_err_t rt_thread_idle_delhook(void (*hook)(void))
#endif
#ifdef RT_USING_HEAP
/* Return whether there is defunctional thread to be deleted. */
rt_inline int _has_defunct_thread(void)
{
@ -140,6 +141,7 @@ rt_inline int _has_defunct_thread(void)
return l->next != l;
}
#endif
/**
* @ingroup Thread