cpu/arm7_common: Fix thread_yield_higher in ISR

thread_yield_higher() in interrupt context must not yield immediately, but at
the end of the ISR. This commit fixes the behavior.
This commit is contained in:
Marian Buschsieweke 2019-07-23 07:51:51 +02:00
parent 0729beb3b2
commit 7f77d69694
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F

View File

@ -18,6 +18,8 @@
#include <stdio.h>
#include "arm_cpu.h"
#include "irq.h"
#include "sched.h"
#include "thread.h"
#define STACK_MARKER (0x77777777)
@ -25,8 +27,13 @@
void thread_yield_higher(void)
{
if (irq_is_in()) {
sched_context_switch_request = 1;
}
else {
__asm__("svc 0\n");
}
}
/*----------------------------------------------------------------------------
* Processor specific routine - here for ARM7