diff options
Diffstat (limited to 'os/ports/cosmic/STM8')
-rw-r--r-- | os/ports/cosmic/STM8/chcore.c | 4 | ||||
-rw-r--r-- | os/ports/cosmic/STM8/chcore.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/os/ports/cosmic/STM8/chcore.c b/os/ports/cosmic/STM8/chcore.c index c5f1de2d6..3c1807330 100644 --- a/os/ports/cosmic/STM8/chcore.c +++ b/os/ports/cosmic/STM8/chcore.c @@ -50,8 +50,8 @@ void _port_switch(Thread *otp) { */
void _port_thread_start(void) {
- _asm(" rim \n"
- " popw x \n");
+ chSysUnlock();
+ _asm(" popw x \n");
}
/**
diff --git a/os/ports/cosmic/STM8/chcore.h b/os/ports/cosmic/STM8/chcore.h index 75bed68cc..9073592aa 100644 --- a/os/ports/cosmic/STM8/chcore.h +++ b/os/ports/cosmic/STM8/chcore.h @@ -203,8 +203,10 @@ struct stm8_startctx { * enabled to invoke system APIs.
*/
#define PORT_IRQ_EPILOGUE() { \
+ dbg_check_lock(); \
if (chSchIsPreemptionRequired()) \
chSchDoReschedule(); \
+ dbg_check_unlock(); \
}
/**
|