2007-11-30 Till Straumann <strauman@slac.stanford.edu>

* shared/irq/irq.h, shared/irq/irq.c, shared/irq/irq_init.c,
	shared/irq/irq_supp.h (added):
	Removed 'is_processor_irq()' from irq.c; the BSP routines
	BSP_enable_irq_at_pic()/BSP_disable_irq_at_pic() are required
	to ignore processor irqs anyways. Removed
	all BSP-defined constants from irq.c. This makes irq.c (almost)
	binary-compatible among BSPs (ultimate goal is making 'shared'
	a library).
	Added a header (irq_supp.h) defining the interface between
	the generic interrupt manager (irq.c) and the routines it
	requires to be supplied by the BSP (eventually, these
	should go into rtems/irq.h).
This commit is contained in:
Till Straumann
2007-11-30 21:40:12 +00:00
parent d9289680a6
commit 2eb9e3995c
6 changed files with 85 additions and 43 deletions

View File

@@ -0,0 +1,42 @@
#ifndef IRQ_SHARED_IRQ_C_GLUE_H
#define IRQ_SHARED_IRQ_C_GLUE_H
/*
* This header describes the routines that are needed by the shared
* version of 'irq.c' (implementing the RTEMS irq API). They
* must be provided by the BSP.
*
* 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.
*
*/
#include <rtems/irq.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* PIC-independent functions to enable/disable interrupt lines at
* the pic.
*
* NOTE: the routines must ignore requests for enabling/disabling
* 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_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);
#ifdef __cplusplus
}
#endif
#endif