mirror of
https://github.com/apache/nuttx.git
synced 2026-08-11 23:45:11 +00: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:
parent
940bbfc720
commit
4b8db6f22c
1 changed files with 13 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue