Merge pull request #14434 from maribu/irq_cleanup
cpu/cortexm_common: Fix cpu_switch_context_exit()
This commit is contained in:
commit
60469026cf
@ -265,15 +265,19 @@ void *thread_isr_stack_start(void)
|
|||||||
return (void *)&_sstack;
|
return (void *)&_sstack;
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((naked)) void NORETURN cpu_switch_context_exit(void)
|
void NORETURN cpu_switch_context_exit(void)
|
||||||
{
|
{
|
||||||
|
/* enable IRQs to make sure the SVC interrupt is reachable */
|
||||||
|
irq_enable();
|
||||||
|
/* trigger the SVC interrupt */
|
||||||
__asm__ volatile (
|
__asm__ volatile (
|
||||||
"bl irq_enable \n" /* enable IRQs to make the SVC
|
"svc #1 \n"
|
||||||
* interrupt is reachable */
|
: /* no outputs */
|
||||||
"svc #1 \n" /* trigger the SVC interrupt */
|
: /* no inputs */
|
||||||
"unreachable%=: \n" /* this loop is unreachable */
|
: /* no clobbers */
|
||||||
"b unreachable%= \n" /* loop indefinitely */
|
);
|
||||||
:::);
|
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
void thread_yield_higher(void)
|
void thread_yield_higher(void)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user