Explorar o código

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

_has_defunct_thread函数增加条件编译,防止没有开启heap时报警
Meco Jianting Man %!s(int64=4) %!d(string=hai) anos
pai
achega
c58d893c1a
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/idle.c

+ 2 - 0
src/idle.c

@@ -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