提交 8b8e4489 编写于 作者: H heyuanjie

同步

上级 7d3af8e9
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#define DBG_ENABLE #define DBG_ENABLE
#define DBG_SECTION_NAME "[LWP]" #define DBG_SECTION_NAME "[LWP]"
#define DBG_COLOR #define DBG_COLOR
#define DBG_LEVEL DBG_LOG #define DBG_LEVEL DBG_WARNING
#include <rtdbg.h> #include <rtdbg.h>
extern rt_thread_t rt_current_thread; extern rt_thread_t rt_current_thread;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#define DBG_ENABLE #define DBG_ENABLE
#define DBG_SECTION_NAME "[LWPMEM]" #define DBG_SECTION_NAME "[LWPMEM]"
#define DBG_COLOR #define DBG_COLOR
#define DBG_LEVEL DBG_LOG #define DBG_LEVEL DBG_WARNING
#include <rtdbg.h> #include <rtdbg.h>
// todo: remove repleat code // todo: remove repleat code
...@@ -117,13 +117,18 @@ void rt_lwp_mem_deinit(struct rt_lwp *lwp) ...@@ -117,13 +117,18 @@ void rt_lwp_mem_deinit(struct rt_lwp *lwp)
RT_ASSERT(lwp != RT_NULL); RT_ASSERT(lwp != RT_NULL);
for (node = lwp->hlist.next; node != &(lwp->hlist); node = node->next) node = lwp->hlist.next;
while (node != &(lwp->hlist))
{ {
struct rt_lwp_memheap *lwp_heap; struct rt_lwp_memheap *lwp_heap;
lwp_heap = rt_list_entry(node, struct rt_lwp_memheap, mlist); lwp_heap = rt_list_entry(node, struct rt_lwp_memheap, mlist);
RT_ASSERT(lwp_heap != RT_NULL); RT_ASSERT(lwp_heap != RT_NULL);
/* update note before free page*/
node = node->next;
rt_lwp_free_page(lwp, lwp_heap); rt_lwp_free_page(lwp, lwp_heap);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册