2008-01-10 Till Straumann <strauman@slac.stanford.edu>

* new-exceptions/bspsupport/irq.c: When unhooking
	and ISR only disable IRQs at the PIC if we are
	unhooking the last ISR.
This commit is contained in:
Till Straumann
2008-01-10 18:25:47 +00:00
parent 5b33dc8076
commit bc0ff4737c
2 changed files with 23 additions and 14 deletions

View File

@@ -1,3 +1,9 @@
2008-01-10 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/irq.c: When unhooking
and ISR only disable IRQs at the PIC if we are
unhooking the last ISR.
2007-12-11 Till Straumann <strauman@slac.stanford.edu>
* Makefile.am: don't normally build-in test code

View File

@@ -230,20 +230,13 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
}
}
else
{
if (rtems_hdl_tbl[irq->name].hdl != irq->hdl)
{
rtems_interrupt_enable(level);
return 0;
}
}
/*
* disable_irq_at_pic is supposed to ignore
* requests to disable interrupts outside
* of the range handled by the PIC
*/
BSP_disable_irq_at_pic(irq->name);
{
if (rtems_hdl_tbl[irq->name].hdl != irq->hdl)
{
rtems_interrupt_enable(level);
return 0;
}
}
/*
* Disable interrupt on device
@@ -277,6 +270,16 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
free(vchain);
}
/* Only disable at PIC if we removed the last handler */
if ( rtems_hdl_tbl[irq->name].hdl == default_rtems_entry.hdl ) {
/*
* disable_irq_at_pic is supposed to ignore
* requests to disable interrupts outside
* of the range handled by the PIC;
*/
BSP_disable_irq_at_pic(irq->name);
}
rtems_interrupt_enable(level);
return 1;