xtensa: asm2 needs to honor thread preemption

Forgot to check the thread preemption status when fetching the stack
to restore.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2017-12-17 11:17:53 -08:00 committed by Anas Nashif
commit 7707fcfa51

View file

@ -128,6 +128,10 @@ static void dump_stack(int *stack)
#if CONFIG_XTENSA_ASM2
static inline void *restore_stack(void *interrupted_stack)
{
if (!_is_preempt(_kernel.current)) {
return interrupted_stack;
}
int key = irq_lock();
_kernel.current->switch_handle = interrupted_stack;