mirror of
https://github.com/apache/nuttx.git
synced 2026-09-28 15:54:57 +08:00
taks_exithook: fix the build error when enable CONFIG_SCHED_DUMP_LEAK
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
This commit is contained in:
@@ -409,6 +409,17 @@ static inline void nxtask_exitwakeup(FAR struct tcb_s *tcb, int status)
|
||||
|
||||
void nxtask_exithook(FAR struct tcb_s *tcb, int status)
|
||||
{
|
||||
#ifdef CONFIG_SCHED_DUMP_LEAK
|
||||
struct mm_memdump_s dump =
|
||||
{
|
||||
tcb->pid,
|
||||
# if CONFIG_MM_BACKTRACE >= 0
|
||||
0,
|
||||
ULONG_MAX
|
||||
# endif
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Under certain conditions, nxtask_exithook() can be called multiple
|
||||
* times. A bit in the TCB was set the first time this function was
|
||||
* called. If that bit is set, then just exit doing nothing more..
|
||||
@@ -463,11 +474,11 @@ void nxtask_exithook(FAR struct tcb_s *tcb, int status)
|
||||
#ifdef CONFIG_SCHED_DUMP_LEAK
|
||||
if ((tcb->flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_KERNEL)
|
||||
{
|
||||
kmm_memdump(tcb->pid);
|
||||
kmm_memdump(&dump);
|
||||
}
|
||||
else
|
||||
{
|
||||
umm_memdump(tcb->pid);
|
||||
umm_memdump(&dump);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user