mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
arch: Move the DUMP_ON_EXIT logic after nxtask_exit.
Otherwise we will try to dump the state of the current task, however the exit handler has already started doing some cleanup and invalidated its group. Accessing the group from dumponexit will crash. Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
committed by
Xiang Xiao
parent
d6c952c56f
commit
6d12ee19e2
@@ -137,11 +137,6 @@ void up_exit(int status)
|
||||
|
||||
sinfo("TCB=%p exiting\n", tcb);
|
||||
|
||||
#ifdef CONFIG_DUMP_ON_EXIT
|
||||
sinfo("Other tasks:\n");
|
||||
sched_foreach(_up_dumponexit, NULL);
|
||||
#endif
|
||||
|
||||
/* Update scheduler parameters */
|
||||
|
||||
nxsched_suspend_scheduler(tcb);
|
||||
@@ -150,6 +145,11 @@ void up_exit(int status)
|
||||
|
||||
(void)nxtask_exit();
|
||||
|
||||
#ifdef CONFIG_DUMP_ON_EXIT
|
||||
sinfo("Other tasks:\n");
|
||||
sched_foreach(_up_dumponexit, NULL);
|
||||
#endif
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user