[rtems commit] shared-irq: add support for custom BSP vector verification
gedare at rtems.org
gedare at rtems.org
Wed Mar 21 16:36:17 UTC 2012
Module: rtems
Branch: master
Commit: f636ba640e19cbceec38c75a4b9dd65623fc6f22
Changeset: http://git.rtems.org/rtems/commit/?id=f636ba640e19cbceec38c75a4b9dd65623fc6f22
Author: Daniel Hellstrom <daniel at gaisler.com>
Date: Mon Feb 6 15:15:48 2012 +0100
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 */
More information about the vc
mailing list