From bd996b1663e9a10aad21ec395eab944a98f3a905 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 19 Jan 2009 19:50:21 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@646 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-AT91SAM7X-GCC/board.c | 6 +++--- demos/ARM7-AT91SAM7X-WEB-GCC/board.c | 6 +++--- demos/ARM7-LPC214x-G++/board.c | 14 ++++++++------ demos/ARM7-LPC214x-GCC-minimal/board.c | 14 ++++++++------ demos/ARM7-LPC214x-GCC/board.c | 14 ++++++++------ 5 files changed, 30 insertions(+), 24 deletions(-) diff --git a/demos/ARM7-AT91SAM7X-GCC/board.c b/demos/ARM7-AT91SAM7X-GCC/board.c index 2329b0080..754b0b366 100644 --- a/demos/ARM7-AT91SAM7X-GCC/board.c +++ b/demos/ARM7-AT91SAM7X-GCC/board.c @@ -26,7 +26,7 @@ extern void FiqHandler(void); -CH_IRQ_HANDLER static void SpuriousHandler(void) { +static CH_IRQ_HANDLER(SpuriousHandler) { CH_IRQ_PROLOGUE(); @@ -38,7 +38,7 @@ CH_IRQ_HANDLER static void SpuriousHandler(void) { /* * SYS IRQ handling here. */ -CH_IRQ_HANDLER static void SYSIrqHandler(void) { +static CH_IRQ_HANDLER(SYSIrqHandler) { CH_IRQ_PROLOGUE(); @@ -48,7 +48,7 @@ CH_IRQ_HANDLER static void SYSIrqHandler(void) { chSysTimerHandlerI(); chSysUnlockI(); } - AT91C_BASE_AIC->AIC_EOICR = 0; \ + AT91C_BASE_AIC->AIC_EOICR = 0; CH_IRQ_EPILOGUE(); } diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/board.c b/demos/ARM7-AT91SAM7X-WEB-GCC/board.c index 87bc438ea..38c91d9fa 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/board.c +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/board.c @@ -27,7 +27,7 @@ extern void FiqHandler(void); -CH_IRQ_HANDLER static void SpuriousHandler(void) { +static CH_IRQ_HANDLER(SpuriousHandler) { CH_IRQ_PROLOGUE(); @@ -39,7 +39,7 @@ CH_IRQ_HANDLER static void SpuriousHandler(void) { /* * SYS IRQ handling here. */ -CH_IRQ_HANDLER static void SYSIrqHandler(void) { +static CH_IRQ_HANDLER(SYSIrqHandler) { CH_IRQ_PROLOGUE(); @@ -49,7 +49,7 @@ CH_IRQ_HANDLER static void SYSIrqHandler(void) { chSysTimerHandlerI(); chSysUnlockI(); } - AT91C_BASE_AIC->AIC_EOICR = 0; \ + AT91C_BASE_AIC->AIC_EOICR = 0; CH_IRQ_EPILOGUE(); } diff --git a/demos/ARM7-LPC214x-G++/board.c b/demos/ARM7-LPC214x-G++/board.c index fef4deb36..f6792851a 100644 --- a/demos/ARM7-LPC214x-G++/board.c +++ b/demos/ARM7-LPC214x-G++/board.c @@ -31,27 +31,29 @@ /* * Non-vectored IRQs handling here. */ -CH_IRQ_HANDLER static void IrqHandler(void) { +static CH_IRQ_HANDLER(IrqHandler) { CH_IRQ_PROLOGUE(); /* nothing */ - VICVectAddr = 0; + VICVectAddr = 0; CH_IRQ_EPILOGUE(); } /* * Timer 0 IRQ handling here. */ -CH_IRQ_HANDLER static void T0IrqHandler(void) { +static CH_IRQ_HANDLER(T0IrqHandler) { CH_IRQ_PROLOGUE(); - T0IR = 1; /* Clear interrupt on match MR0. */ - chSysTimerHandlerI(); - VICVectAddr = 0; + chSysLockI(); + chSysTimerHandlerI(); + chSysUnlockI(); + + VICVectAddr = 0; CH_IRQ_EPILOGUE(); } diff --git a/demos/ARM7-LPC214x-GCC-minimal/board.c b/demos/ARM7-LPC214x-GCC-minimal/board.c index e10297562..4ccb5e78c 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/board.c +++ b/demos/ARM7-LPC214x-GCC-minimal/board.c @@ -31,27 +31,29 @@ /* * Non-vectored IRQs handling here. */ -CH_IRQ_HANDLER static void IrqHandler(void) { +static CH_IRQ_HANDLER(IrqHandler) { CH_IRQ_PROLOGUE(); /* nothing */ - VICVectAddr = 0; + VICVectAddr = 0; CH_IRQ_EPILOGUE(); } /* * Timer 0 IRQ handling here. */ -CH_IRQ_HANDLER static void T0IrqHandler(void) { +static CH_IRQ_HANDLER(T0IrqHandler) { CH_IRQ_PROLOGUE(); - T0IR = 1; /* Clear interrupt on match MR0. */ - chSysTimerHandlerI(); - VICVectAddr = 0; + chSysLockI(); + chSysTimerHandlerI(); + chSysUnlockI(); + + VICVectAddr = 0; CH_IRQ_EPILOGUE(); } diff --git a/demos/ARM7-LPC214x-GCC/board.c b/demos/ARM7-LPC214x-GCC/board.c index 767fb9123..3de7f82ba 100644 --- a/demos/ARM7-LPC214x-GCC/board.c +++ b/demos/ARM7-LPC214x-GCC/board.c @@ -31,27 +31,29 @@ /* * Non-vectored IRQs handling here. */ -CH_IRQ_HANDLER static void IrqHandler(void) { +static CH_IRQ_HANDLER(IrqHandler) { CH_IRQ_PROLOGUE(); /* nothing */ - VICVectAddr = 0; + VICVectAddr = 0; CH_IRQ_EPILOGUE(); } /* * Timer 0 IRQ handling here. */ -CH_IRQ_HANDLER static void T0IrqHandler(void) { +static CH_IRQ_HANDLER(T0IrqHandler) { CH_IRQ_PROLOGUE(); - T0IR = 1; /* Clear interrupt on match MR0. */ - chSysTimerHandlerI(); - VICVectAddr = 0; + chSysLockI(); + chSysTimerHandlerI(); + chSysUnlockI(); + + VICVectAddr = 0; CH_IRQ_EPILOGUE(); }