diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-03-17 10:32:12 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-03-17 10:32:12 +0000 |
commit | 43433fde0bd127e7857379a2799f538b71796287 (patch) | |
tree | 06ba9a664a3ae35259388c97e256ea823f222231 /os/hal/ports/simulator/win32/hal_lld.c | |
parent | 52b961258008124cecb3f6f62f8c1aa7b608de12 (diff) | |
download | ChibiOS-43433fde0bd127e7857379a2799f538b71796287.tar.gz ChibiOS-43433fde0bd127e7857379a2799f538b71796287.tar.bz2 ChibiOS-43433fde0bd127e7857379a2799f538b71796287.zip |
Improvements to simulator IRQ detection.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11792 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/ports/simulator/win32/hal_lld.c')
-rw-r--r-- | os/hal/ports/simulator/win32/hal_lld.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/os/hal/ports/simulator/win32/hal_lld.c b/os/hal/ports/simulator/win32/hal_lld.c index 624ec5f4d..e00aab428 100644 --- a/os/hal/ports/simulator/win32/hal_lld.c +++ b/os/hal/ports/simulator/win32/hal_lld.c @@ -76,20 +76,18 @@ void hal_lld_init(void) { */
void _sim_check_for_interrupts(void) {
LARGE_INTEGER n;
+ bool int_occurred = false;
#if HAL_USE_SERIAL
if (sd_lld_interrupt_pending()) {
- _dbg_check_lock();
- if (chSchIsPreemptionRequired())
- chSchDoReschedule();
- _dbg_check_unlock();
- return;
+ int_occured = true;
}
#endif
/* Interrupt Timer simulation (10ms interval).*/
QueryPerformanceCounter(&n);
if (n.QuadPart > nextcnt.QuadPart) {
+ int_occured = true;
nextcnt.QuadPart += slice.QuadPart;
CH_IRQ_PROLOGUE();
@@ -99,7 +97,9 @@ void _sim_check_for_interrupts(void) { chSysUnlockFromISR();
CH_IRQ_EPILOGUE();
+ }
+ if (int_occurred) {
_dbg_check_lock();
if (chSchIsPreemptionRequired())
chSchDoReschedule();
|