diff options
-rw-r--r-- | os/ports/GCC/ARMCM3/chcore.c | 2 | ||||
-rw-r--r-- | os/ports/GCC/ARMCM3/chcore.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/os/ports/GCC/ARMCM3/chcore.c b/os/ports/GCC/ARMCM3/chcore.c index ad50bfc31..c0a45ffb8 100644 --- a/os/ports/GCC/ARMCM3/chcore.c +++ b/os/ports/GCC/ARMCM3/chcore.c @@ -151,8 +151,8 @@ void PendSVVector(void) { Thread *otp;
register struct intctx *sp_thd asm("r12");
- chSysLockFromIsr();
asm volatile ("push {lr}");
+ chSysLockFromIsr();
if (!chSchRescRequiredI()) {
chSysUnlockFromIsr();
asm volatile ("pop {pc}");
diff --git a/os/ports/GCC/ARMCM3/chcore.h b/os/ports/GCC/ARMCM3/chcore.h index 4b1a5355f..7d33251ad 100644 --- a/os/ports/GCC/ARMCM3/chcore.h +++ b/os/ports/GCC/ARMCM3/chcore.h @@ -233,7 +233,7 @@ struct context { }
#else
#define port_lock() { \
- asm volatile ("bl _port_lock" : : : "r3", "lr"); \
+ asm volatile ("bl _port_lock" : : : "r3", "lr"); \
}
#endif
@@ -247,7 +247,7 @@ struct context { }
#else
#define port_unlock() { \
- asm volatile ("bl _port_unlock" : : : "r3", "lr"); \
+ asm volatile ("bl _port_unlock" : : : "r3", "lr"); \
}
#endif
|