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:
parent
63ad74f833
commit
7707fcfa51
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue