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:
parent
0729beb3b2
commit
7f77d69694
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "arm_cpu.h"
|
#include "arm_cpu.h"
|
||||||
|
#include "irq.h"
|
||||||
|
#include "sched.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
|
|
||||||
#define STACK_MARKER (0x77777777)
|
#define STACK_MARKER (0x77777777)
|
||||||
@ -25,7 +27,12 @@
|
|||||||
|
|
||||||
void thread_yield_higher(void)
|
void thread_yield_higher(void)
|
||||||
{
|
{
|
||||||
__asm__("svc 0\n");
|
if (irq_is_in()) {
|
||||||
|
sched_context_switch_request = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
__asm__("svc 0\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user