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;
|
||||
}
|
||||
|
||||
__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 (
|
||||
"bl irq_enable \n" /* enable IRQs to make the SVC
|
||||
* interrupt is reachable */
|
||||
"svc #1 \n" /* trigger the SVC interrupt */
|
||||
"unreachable%=: \n" /* this loop is unreachable */
|
||||
"b unreachable%= \n" /* loop indefinitely */
|
||||
:::);
|
||||
"svc #1 \n"
|
||||
: /* no outputs */
|
||||
: /* no inputs */
|
||||
: /* no clobbers */
|
||||
);
|
||||
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
void thread_yield_higher(void)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user