From eada2bf8d8c7acdef8c020018522df2ebdb00c2e Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 15 Oct 2016 12:23:36 -0600 Subject: [PATCH] XTENSA: Add function prototypes --- arch/xtensa/include/irq.h | 33 +++++++++++++++++++++++++++++---- arch/xtensa/include/types.h | 2 +- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/arch/xtensa/include/irq.h b/arch/xtensa/include/irq.h index 49bfc5b138..7e47291618 100644 --- a/arch/xtensa/include/irq.h +++ b/arch/xtensa/include/irq.h @@ -47,6 +47,7 @@ /* Include NuttX-specific IRQ definitions */ #include +#include /* Include architecture-specific IRQ definitions */ @@ -180,10 +181,6 @@ struct xcptcontext * Public Data ****************************************************************************/ -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - #ifdef __cplusplus #define EXTERN extern "C" extern "C" @@ -192,6 +189,34 @@ extern "C" #define EXTERN extern #endif +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: xtensa_enable_interrupts + * + * Description: + * Enables a set of interrupts. Does not simply set INTENABLE directly, + * but computes it as a function of the current virtual priority. + * Can be called from interrupt handlers. + * + ****************************************************************************/ + +irqstate_t xtensa_enable_interrupts(irqstate_t mask); + +/**************************************************************************** + * Name: xtensa_disable_interrupts + * + * Description: + * Disables a set of interrupts. Does not simply set INTENABLE directly, + * but computes it as a function of the current virtual priority. + * Can be called from interrupt handlers. + * + ****************************************************************************/ + +irqstate_t xtensa_disable_interrupts(irqstate_t mask); + #undef EXTERN #ifdef __cplusplus } diff --git a/arch/xtensa/include/types.h b/arch/xtensa/include/types.h index ea8e19ff36..55d2fee188 100644 --- a/arch/xtensa/include/types.h +++ b/arch/xtensa/include/types.h @@ -83,7 +83,7 @@ typedef unsigned long _uintptr_t; /* This is the size of the interrupt state save returned by up_irq_save(). */ -typedef unsigned long irqstate_t; +typedef unsigned int irqstate_t; #endif /* __ASSEMBLY__ */