[PATCH 15] shared-irq: add support for custom BSP vector verification
Joel Sherrill
Joel.Sherrill at OARcorp.com
Mon Mar 19 19:50:51 UTC 2012
This looks OK to me.
Could someone apply this please?
________________________________________
From: rtems-devel-bounces at rtems.org [rtems-devel-bounces at rtems.org] On Behalf Of Daniel Hellstrom [daniel at gaisler.com]
Sent: Monday, February 06, 2012 8:15 AM
To: rtems-devel at rtems.org
Subject: [PATCH 15] shared-irq: add support for custom BSP vector verification
Signed-off-by: Daniel Hellstrom <daniel at gaisler.com>
---
c/src/lib/libbsp/shared/include/irq-generic.h | 2 ++
c/src/lib/libbsp/shared/include/irq.h | 8 ++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/c/src/lib/libbsp/shared/include/irq-generic.h b/c/src/lib/libbsp/shared/include/irq-generic.h
index 5181952..3cbb7db 100644
--- a/c/src/lib/libbsp/shared/include/irq-generic.h
+++ b/c/src/lib/libbsp/shared/include/irq-generic.h
@@ -134,6 +134,7 @@ static inline rtems_vector_number bsp_interrupt_handler_index(
* @{
*/
+#if !defined(BSP_INTERRUPT_CUSTOM_VALID_VECTOR)
/**
* @brief Returns true if the interrupt vector with number @a vector is valid.
*/
@@ -142,6 +143,7 @@ static inline bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
return (rtems_vector_number) BSP_INTERRUPT_VECTOR_MIN <= vector
&& vector <= (rtems_vector_number) BSP_INTERRUPT_VECTOR_MAX;
}
+#endif
/**
* @brief Default interrupt handler.
diff --git a/c/src/lib/libbsp/shared/include/irq.h b/c/src/lib/libbsp/shared/include/irq.h
index ae57bd1..19aed6f 100644
--- a/c/src/lib/libbsp/shared/include/irq.h
+++ b/c/src/lib/libbsp/shared/include/irq.h
@@ -72,6 +72,14 @@
typedef uint8_t bsp_interrupt_handler_index_type;
#endif
+/**
+ * @brief Enable custom vector checking
+ *
+ * If defined the BSP must implement the custom bsp_interrupt_is_valid_vector()
+ * vector validator check routine.
+ */
+#undef BSP_INTERRUPT_CUSTOM_VALID_VECTOR
+
/** @} */
#endif /* LIBBSP_SHARED_IRQ_CONFIG_H */
--
1.7.0.4
_______________________________________________
rtems-devel mailing list
rtems-devel at rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel
More information about the devel
mailing list