xtensa/asm2: Don't return into dead threads
It's not impossible that something we just handled (e.g. a machine exception) called k_thread_abort() on our current thread. Don't try to return into it, check the DEAD state. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
3f5027f835
commit
0244d01fda
1 changed files with 2 additions and 1 deletions
|
@ -140,7 +140,8 @@ static void dump_stack(int *stack)
|
|||
#if CONFIG_XTENSA_ASM2
|
||||
static inline void *restore_stack(void *interrupted_stack)
|
||||
{
|
||||
if (!_is_preempt(_current)) {
|
||||
if (!_is_preempt(_current) &&
|
||||
!(_current->base.thread_state & _THREAD_DEAD)) {
|
||||
return interrupted_stack;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue