This commit is contained in:
parent
7d3af8e9ff
commit
8b8e448944
|
@ -34,7 +34,7 @@
|
|||
#define DBG_ENABLE
|
||||
#define DBG_SECTION_NAME "[LWP]"
|
||||
#define DBG_COLOR
|
||||
#define DBG_LEVEL DBG_LOG
|
||||
#define DBG_LEVEL DBG_WARNING
|
||||
#include <rtdbg.h>
|
||||
|
||||
extern rt_thread_t rt_current_thread;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#define DBG_ENABLE
|
||||
#define DBG_SECTION_NAME "[LWPMEM]"
|
||||
#define DBG_COLOR
|
||||
#define DBG_LEVEL DBG_LOG
|
||||
#define DBG_LEVEL DBG_WARNING
|
||||
#include <rtdbg.h>
|
||||
|
||||
// todo: remove repleat code
|
||||
|
@ -117,13 +117,18 @@ void rt_lwp_mem_deinit(struct rt_lwp *lwp)
|
|||
|
||||
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;
|
||||
|
||||
lwp_heap = rt_list_entry(node, struct rt_lwp_memheap, mlist);
|
||||
|
||||
RT_ASSERT(lwp_heap != RT_NULL);
|
||||
|
||||
/* update note before free page*/
|
||||
node = node->next;
|
||||
|
||||
rt_lwp_free_page(lwp, lwp_heap);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue