summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-03 15:44:59 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-03 15:44:59 +0000
commit1b1aca1fdbd24884db7b1649e3dd78581e060966 (patch)
tree74424266866f7da9c6b0665c35640eaef7516556 /c
parent2007-12-03 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-1b1aca1fdbd24884db7b1649e3dd78581e060966.tar.bz2
2007-12-03 Joel Sherrill <joel.sherrill@oarcorp.com>
* shared/irq/irq.c, shared/irq/irq_supp.h: Correct conditionals and includes.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/powerpc/ChangeLog5
-rw-r--r--c/src/lib/libbsp/powerpc/shared/irq/irq.c3
-rw-r--r--c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h60
3 files changed, 46 insertions, 22 deletions
diff --git a/c/src/lib/libbsp/powerpc/ChangeLog b/c/src/lib/libbsp/powerpc/ChangeLog
index f830286056..5574768edc 100644
--- a/c/src/lib/libbsp/powerpc/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-03 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * shared/irq/irq.c, shared/irq/irq_supp.h: Correct conditionals and
+ includes.
+
2007-12-02 Till Straumann <strauman@slac.stanford.edu>
* shared/irq/i8259.c, shared/irq/irq.h, shared/irq/irq_supp.h,
diff --git a/c/src/lib/libbsp/powerpc/shared/irq/irq.c b/c/src/lib/libbsp/powerpc/shared/irq/irq.c
index b5d1332658..d613d6bdaa 100644
--- a/c/src/lib/libbsp/powerpc/shared/irq/irq.c
+++ b/c/src/lib/libbsp/powerpc/shared/irq/irq.c
@@ -13,8 +13,9 @@
#include <stdlib.h>
-#include <rtems/irq.h>
+#include <bsp.h>
#include <bsp/irq_supp.h>
+#include <rtems/irq.h>
#include <rtems/score/apiext.h> /* for post ISR signal processing */
#include <libcpu/raw_exception.h>
#include <bsp/vectors.h>
diff --git a/c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h b/c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h
index 3a0cd9a866..c4f681030a 100644
--- a/c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h
+++ b/c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h
@@ -1,3 +1,14 @@
+/*
+ * The license and distribution terms for this file may be
+ * found in found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+
#ifndef IRQ_SHARED_IRQ_C_GLUE_H
#define IRQ_SHARED_IRQ_C_GLUE_H
/*
@@ -29,19 +40,19 @@ extern "C" {
* interrupts that are outside of the range handled by the
* PIC(s).
*/
-extern void BSP_enable_irq_at_pic (const rtems_irq_number irqLine);
+extern void BSP_enable_irq_at_pic(const rtems_irq_number irqLine);
/*
* RETURNS: nonzero (> 0 ) if irq was enabled originally, zero if irq
* was off and negative value if there was an error.
*/
-extern int BSP_disable_irq_at_pic (const rtems_irq_number irqLine);
+extern int BSP_disable_irq_at_pic(const rtems_irq_number irqLine);
/*
* Initialize the PIC.
* Return nonzero on success, zero on failure (which will be treated
* as fatal by the manager).
*/
-extern int BSP_setup_the_pic (rtems_irq_global_settings* config);
+extern int BSP_setup_the_pic(rtems_irq_global_settings* config);
struct _BSP_Exception_frame;
@@ -60,25 +71,32 @@ void C_dispatch_irq_handler (struct _BSP_Exception_frame *frame, unsigned int ex
*/
static inline void
-bsp_irq_dispatch_list(rtems_irq_connect_data *tbl, unsigned irq, rtems_irq_hdl sentinel)
+bsp_irq_dispatch_list(
+ rtems_irq_connect_data *tbl,
+ unsigned irq,
+ rtems_irq_hdl sentinel
+)
{
-register uint32_t l_orig;
-
- l_orig = _ISR_Get_level();
-
- /* Enable all interrupts */
- _ISR_Set_level(0);
-
- /* rtems_hdl_tbl[irq].hdl(rtems_hdl_tbl[irq].handle); */
- {
- rtems_irq_connect_data* vchain;
- for( vchain = &tbl[irq];
- ((int)vchain != -1 && vchain->hdl != sentinel);
- vchain = (rtems_irq_connect_data*)vchain->next_handler )
- {
- vchain->hdl(vchain->handle);
- }
- }
+ register uint32_t l_orig;
+
+ l_orig = _ISR_Get_level();
+
+ /* Enable all interrupts */
+ _ISR_Set_level(0);
+
+ #ifndef BSP_SHARED_HANDLER_SUPPORT
+ rtems_hdl_tbl[irq].hdl(rtems_hdl_tbl[irq].handle); */
+ #else
+ {
+ rtems_irq_connect_data* vchain;
+ for( vchain = &tbl[irq];
+ ((int)vchain != -1 && vchain->hdl != sentinel);
+ vchain = (rtems_irq_connect_data*)vchain->next_handler )
+ {
+ vchain->hdl(vchain->handle);
+ }
+ }
+ #endif
/* Restore original level */
_ISR_Set_level(l_orig);