mirror of
https://github.com/apache/nuttx.git
synced 2025-12-11 12:57:57 +08:00
Implements support for smaller interrupt tables as described at http://www.nuttx.org/doku.php?id=wiki:howtos:smallvectors . This is largely the work of Mark Schulte. However, I have made several changes to match with the Wiki document. If you like the change, thanks go to Marc. For any errors you can blame me.
This commit is contained in:
@@ -43,11 +43,29 @@
|
||||
|
||||
#include "irq/irq.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* This is the number of entries in the interrupt vector table */
|
||||
|
||||
#ifdef CONFIG_ARCH_MINIMAL_VECTORTABLE
|
||||
# define TAB_SIZE CONFIG_ARCH_NUSER_INTERRUPTS
|
||||
#else
|
||||
# define TAB_SIZE NR_IRQS
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
struct irq g_irqvector[NR_IRQS];
|
||||
/* This is the interrupt vector table */
|
||||
|
||||
#ifdef CONFIG_ARCH_MINIMAL_VECTORTABLE
|
||||
struct irq_info_s g_irqvector[CONFIG_ARCH_NUSER_INTERRUPTS];
|
||||
#else
|
||||
struct irq_info_s g_irqvector[NR_IRQS];
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
@@ -67,7 +85,7 @@ void irq_initialize(void)
|
||||
|
||||
/* Point all interrupt vectors to the unexpected interrupt */
|
||||
|
||||
for (i = 0; i < NR_IRQS; i++)
|
||||
for (i = 0; i < TAB_SIZE; i++)
|
||||
{
|
||||
g_irqvector[i].handler = irq_unexpected_isr;
|
||||
g_irqvector[i].arg = NULL;
|
||||
|
||||
Reference in New Issue
Block a user