[PATCH v3 24/42] bsps/irq: Move bsp_interrupt_handler_is_empty()

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jul 23 13:56:32 UTC 2021


This function is only used by one BSP.

Update #3269.
---
 bsps/i386/shared/irq/irq.c     | 11 +++++++++++
 bsps/include/bsp/irq-generic.h | 11 -----------
 bsps/shared/irq/irq-generic.c  | 19 -------------------
 3 files changed, 11 insertions(+), 30 deletions(-)

diff --git a/bsps/i386/shared/irq/irq.c b/bsps/i386/shared/irq/irq.c
index a0745ab41d..3ba1051f8f 100644
--- a/bsps/i386/shared/irq/irq.c
+++ b/bsps/i386/shared/irq/irq.c
@@ -351,6 +351,17 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
   return RTEMS_SUCCESSFUL;
 }
 
+static bool bsp_interrupt_handler_is_empty(rtems_vector_number vector)
+{
+  rtems_vector_number index;
+  rtems_interrupt_entry *head;
+
+  index = bsp_interrupt_handler_index(vector);
+  head = &bsp_interrupt_handler_table[index];
+
+  return bsp_interrupt_is_empty_handler_entry(head);
+}
+
 /*
  * Global so the asm handler can call it.
  */
diff --git a/bsps/include/bsp/irq-generic.h b/bsps/include/bsp/irq-generic.h
index e9cb0b4bb9..12e8f9155b 100644
--- a/bsps/include/bsp/irq-generic.h
+++ b/bsps/include/bsp/irq-generic.h
@@ -415,17 +415,6 @@ static inline void bsp_interrupt_handler_dispatch( rtems_vector_number vector )
   }
 }
 
-/**
- * @brief Is interrupt handler empty.
- *
- * This routine returns true if the handler is empty and has not been
- * initialised else false is returned. The interrupt lock is not used
- * so this call can be used from within interrupts.
- *
- * @return If empty true shall be returned else false is returned.
- */
-bool bsp_interrupt_handler_is_empty(rtems_vector_number vector);
-
 /** @} */
 
 /**
diff --git a/bsps/shared/irq/irq-generic.c b/bsps/shared/irq/irq-generic.c
index 59963182ab..df57c99ae3 100644
--- a/bsps/shared/irq/irq-generic.c
+++ b/bsps/shared/irq/irq-generic.c
@@ -462,22 +462,3 @@ rtems_status_code rtems_interrupt_handler_remove(
 {
   return bsp_interrupt_handler_remove(vector, handler, arg);
 }
-
-bool bsp_interrupt_handler_is_empty(rtems_vector_number vector)
-{
-  rtems_vector_number index = 0;
-  rtems_interrupt_entry *head = NULL;
-  bool empty;
-
-  /* For use in interrupts so no lock. */
-
-  /* Get handler table index */
-  index = bsp_interrupt_handler_index(vector);
-
-  /* Get head entry of the handler list for the vector */
-  head = &bsp_interrupt_handler_table [index];
-
-  empty = bsp_interrupt_is_empty_handler_entry(head);
-
-  return empty;
-}
-- 
2.26.2



More information about the devel mailing list