From 58f1fe92ee9c68ffd08bccd19f67eafbbc968a71 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 11 Jan 2012 18:02:20 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3788 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/Win32/hal_lld.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'os/hal/platforms/Win32/hal_lld.c') diff --git a/os/hal/platforms/Win32/hal_lld.c b/os/hal/platforms/Win32/hal_lld.c index 48d017f2f..183185c98 100644 --- a/os/hal/platforms/Win32/hal_lld.c +++ b/os/hal/platforms/Win32/hal_lld.c @@ -83,8 +83,10 @@ void ChkIntSources(void) { #if HAL_USE_SERIAL if (sd_lld_interrupt_pending()) { + dbg_check_lock(); if (chSchIsPreemptionRequired()) chSchDoReschedule(); + dbg_check_unlock(); return; } #endif @@ -93,9 +95,19 @@ void ChkIntSources(void) { QueryPerformanceCounter(&n); if (n.QuadPart > nextcnt.QuadPart) { nextcnt.QuadPart += slice.QuadPart; + + CH_IRQ_PROLOGUE(); + + chSysLockFromIsr(); chSysTimerHandlerI(); + chSysUnlockFromIsr(); + + CH_IRQ_EPILOGUE(); + + dbg_check_lock(); if (chSchIsPreemptionRequired()) chSchDoReschedule(); + dbg_check_unlock(); } } -- cgit v1.2.3