2009-05-05 Jennifer Averett <jennifer.averett@OARcorp.com>

* new-exceptions/bspsupport/irq_supp.h: Split routine to allow bsps
	with nonstandard/non-existant pics to call with interrupts off.
This commit is contained in:
Jennifer Averett
2009-05-05 16:20:51 +00:00
parent 31a5ec8cb0
commit 8e230e6cba
2 changed files with 30 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
2009-05-05 Jennifer Averett <jennifer.averett@OARcorp.com>
* new-exceptions/bspsupport/irq_supp.h: Split routine to allow bsps
with nonstandard/non-existant pics to call with interrupts off.
2009-03-12 Joel Sherrill <joel.sherrill@OARcorp.com> 2009-03-12 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1385/cpukit PR 1385/cpukit

View File

@@ -66,6 +66,29 @@ struct _BSP_Exception_frame;
*/ */
int C_dispatch_irq_handler (struct _BSP_Exception_frame *frame, unsigned int excNum); int C_dispatch_irq_handler (struct _BSP_Exception_frame *frame, unsigned int excNum);
/*
* Snippet to be used by PIC drivers and by bsp_irq_dispatch_list
* traverses list of shared handlers for a given interrupt
*
*/
static inline void
bsp_irq_dispatch_list_base(
rtems_irq_connect_data *tbl,
unsigned irq,
rtems_irq_hdl sentinel
)
{
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);
}
}
/* /*
* Snippet to be used by PIC drivers; * Snippet to be used by PIC drivers;
* enables interrupts, traverses list of * enables interrupts, traverses list of
@@ -90,13 +113,8 @@ bsp_irq_dispatch_list(
/* Enable all interrupts */ /* Enable all interrupts */
_ISR_Set_level(0); _ISR_Set_level(0);
rtems_irq_connect_data* vchain;
for( vchain = &tbl[irq]; bsp_irq_dispatch_list_base( tbl, irq, sentinel );
((int)vchain != -1 && vchain->hdl != sentinel);
vchain = (rtems_irq_connect_data*)vchain->next_handler )
{
vchain->hdl(vchain->handle);
}
/* Restore original level */ /* Restore original level */
_ISR_Set_level(l_orig); _ISR_Set_level(l_orig);