[PATCH 14/41] bsps/irq: Add rtems_interrupt_is_pending()

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Jul 12 12:49:36 UTC 2021


Add a default implementation which just returns RTEMS_UNSATISFIED.

Update #3269.
---
 bsps/arm/beagle/irq/irq.c                 | 11 ++++++++++
 bsps/arm/csb336/irq/irq.c                 | 11 ++++++++++
 bsps/arm/csb337/irq/irq.c                 | 11 ++++++++++
 bsps/arm/edb7312/irq/irq.c                | 11 ++++++++++
 bsps/arm/gumstix/irq/irq.c                | 11 ++++++++++
 bsps/arm/lpc24xx/irq/irq.c                | 11 ++++++++++
 bsps/arm/lpc32xx/irq/irq.c                | 11 ++++++++++
 bsps/arm/raspberrypi/irq/irq.c            | 11 ++++++++++
 bsps/arm/rtl22xx/irq/irq.c                | 11 ++++++++++
 bsps/arm/shared/irq/irq-armv7m.c          | 11 ++++++++++
 bsps/arm/smdk2410/irq/irq.c               | 11 ++++++++++
 bsps/arm/tms570/irq/irq.c                 | 11 ++++++++++
 bsps/i386/shared/irq/irq.c                | 11 ++++++++++
 bsps/include/bsp/irq-generic.h            | 26 +++++++++++++++++++++++
 bsps/lm32/shared/irq/irq.c                | 11 ++++++++++
 bsps/m68k/genmcf548x/irq/irq.c            | 11 ++++++++++
 bsps/mips/shared/irq/irq.c                | 11 ++++++++++
 bsps/powerpc/gen5200/irq/irq.c            | 11 ++++++++++
 bsps/powerpc/gen83xx/irq/irq.c            | 11 ++++++++++
 bsps/powerpc/mpc55xxevb/start/irq.c       | 11 ++++++++++
 bsps/powerpc/mpc8260ads/irq/irq.c         | 11 ++++++++++
 bsps/powerpc/psim/irq/irq_init.c          | 11 ++++++++++
 bsps/powerpc/qemuppc/irq/irq_init.c       | 11 ++++++++++
 bsps/powerpc/qoriq/irq/irq.c              | 22 +++++++++++++++++++
 bsps/powerpc/shared/irq/ppc-irq-generic.c | 11 ++++++++++
 bsps/powerpc/t32mppc/irq/irq.c            | 11 ++++++++++
 bsps/powerpc/tqm8xx/irq/irq.c             | 11 ++++++++++
 bsps/powerpc/virtex/irq/irq_init.c        | 11 ++++++++++
 bsps/riscv/griscv/irq/irq.c               | 11 ++++++++++
 bsps/riscv/riscv/irq/irq.c                | 11 ++++++++++
 bsps/shared/dev/irq/arm-gicv2.c           | 11 ++++++++++
 bsps/shared/dev/irq/arm-gicv3.c           | 11 ++++++++++
 bsps/shared/irq/irq-cause-clear.c         | 16 ++++++++++++++
 bsps/shared/irq/irq-default.c             | 11 ++++++++++
 bsps/sparc/leon3/start/eirq.c             | 11 ++++++++++
 bsps/sparc/shared/irq/irq-shared.c        | 11 ++++++++++
 bsps/x86_64/amd64/interrupts/idt.c        | 11 ++++++++++
 37 files changed, 438 insertions(+)

diff --git a/bsps/arm/beagle/irq/irq.c b/bsps/arm/beagle/irq/irq.c
index d54b49f0ca..e34a89afff 100644
--- a/bsps/arm/beagle/irq/irq.c
+++ b/bsps/arm/beagle/irq/irq.c
@@ -103,6 +103,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/csb336/irq/irq.c b/bsps/arm/csb336/irq/irq.c
index 2cc4f5bb5c..13f094e1fb 100644
--- a/bsps/arm/csb336/irq/irq.c
+++ b/bsps/arm/csb336/irq/irq.c
@@ -34,6 +34,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/csb337/irq/irq.c b/bsps/arm/csb337/irq/irq.c
index 1679b89dc3..1b13f0b461 100644
--- a/bsps/arm/csb337/irq/irq.c
+++ b/bsps/arm/csb337/irq/irq.c
@@ -35,6 +35,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/edb7312/irq/irq.c b/bsps/arm/edb7312/irq/irq.c
index 573e4f015d..75dffdec9f 100644
--- a/bsps/arm/edb7312/irq/irq.c
+++ b/bsps/arm/edb7312/irq/irq.c
@@ -35,6 +35,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/gumstix/irq/irq.c b/bsps/arm/gumstix/irq/irq.c
index 9a185e247b..d28e4c051f 100644
--- a/bsps/arm/gumstix/irq/irq.c
+++ b/bsps/arm/gumstix/irq/irq.c
@@ -32,6 +32,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/lpc24xx/irq/irq.c b/bsps/arm/lpc24xx/irq/irq.c
index ef23824f33..0514099c6f 100644
--- a/bsps/arm/lpc24xx/irq/irq.c
+++ b/bsps/arm/lpc24xx/irq/irq.c
@@ -72,6 +72,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/lpc32xx/irq/irq.c b/bsps/arm/lpc32xx/irq/irq.c
index 083a5fa343..b81920f7e9 100644
--- a/bsps/arm/lpc32xx/irq/irq.c
+++ b/bsps/arm/lpc32xx/irq/irq.c
@@ -268,6 +268,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/raspberrypi/irq/irq.c b/bsps/arm/raspberrypi/irq/irq.c
index bcc7a7b71a..0d82e12640 100644
--- a/bsps/arm/raspberrypi/irq/irq.c
+++ b/bsps/arm/raspberrypi/irq/irq.c
@@ -151,6 +151,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/rtl22xx/irq/irq.c b/bsps/arm/rtl22xx/irq/irq.c
index 45bf207c5c..56b1b4c4f1 100644
--- a/bsps/arm/rtl22xx/irq/irq.c
+++ b/bsps/arm/rtl22xx/irq/irq.c
@@ -34,6 +34,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/shared/irq/irq-armv7m.c b/bsps/arm/shared/irq/irq-armv7m.c
index 00a25413c6..2ce08a9fc8 100644
--- a/bsps/arm/shared/irq/irq-armv7m.c
+++ b/bsps/arm/shared/irq/irq-armv7m.c
@@ -46,6 +46,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/smdk2410/irq/irq.c b/bsps/arm/smdk2410/irq/irq.c
index 73cfd58a48..47f951cb19 100644
--- a/bsps/arm/smdk2410/irq/irq.c
+++ b/bsps/arm/smdk2410/irq/irq.c
@@ -35,6 +35,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/arm/tms570/irq/irq.c b/bsps/arm/tms570/irq/irq.c
index 7c50543f3c..a7e1465822 100644
--- a/bsps/arm/tms570/irq/irq.c
+++ b/bsps/arm/tms570/irq/irq.c
@@ -104,6 +104,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/i386/shared/irq/irq.c b/bsps/i386/shared/irq/irq.c
index a91e8ba146..bb7debf89a 100644
--- a/bsps/i386/shared/irq/irq.c
+++ b/bsps/i386/shared/irq/irq.c
@@ -278,6 +278,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/include/bsp/irq-generic.h b/bsps/include/bsp/irq-generic.h
index 4a87c6e3a6..bb3c98bdd3 100644
--- a/bsps/include/bsp/irq-generic.h
+++ b/bsps/include/bsp/irq-generic.h
@@ -290,6 +290,32 @@ void bsp_interrupt_vector_enable(rtems_vector_number vector);
  */
 void bsp_interrupt_vector_disable(rtems_vector_number vector);
 
+/**
+ * @brief Checks if the interrupt is pending.
+ *
+ * The function checks if the interrupt associated with the interrupt vector
+ * specified by ``vector`` was pending for the processor executing the function
+ * call at some time point during the call.
+ *
+ * @param vector is the interrupt vector number.  It shall be valid.
+ *
+ * @param[out] pending is the pointer to a ``bool`` object.  It shall not be
+ *   ``NULL``.  When the function call is successful, the pending status of
+ *   the interrupt associated with the interrupt vector specified by ``vector``
+ *   will be stored in this object.  When the interrupt was pending for the
+ *   processor executing the function call at some time point during the call,
+ *   the object will be set to true, otherwise to false.
+ *
+ * @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
+ *
+ * @retval ::RTEMS_UNSATISFIED The request to get the pending status has not
+ *   been satisfied.
+ */
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+);
+
 /**
  * @brief Causes the interrupt vector.
  *
diff --git a/bsps/lm32/shared/irq/irq.c b/bsps/lm32/shared/irq/irq.c
index a4ac0feef8..c539220912 100644
--- a/bsps/lm32/shared/irq/irq.c
+++ b/bsps/lm32/shared/irq/irq.c
@@ -25,6 +25,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/m68k/genmcf548x/irq/irq.c b/bsps/m68k/genmcf548x/irq/irq.c
index 3df7b92abc..7261da0344 100644
--- a/bsps/m68k/genmcf548x/irq/irq.c
+++ b/bsps/m68k/genmcf548x/irq/irq.c
@@ -67,6 +67,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/mips/shared/irq/irq.c b/bsps/mips/shared/irq/irq.c
index a602bee5dc..5b0aa60af1 100644
--- a/bsps/mips/shared/irq/irq.c
+++ b/bsps/mips/shared/irq/irq.c
@@ -75,6 +75,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/gen5200/irq/irq.c b/bsps/powerpc/gen5200/irq/irq.c
index 7f0c338808..48b6ea7e29 100644
--- a/bsps/powerpc/gen5200/irq/irq.c
+++ b/bsps/powerpc/gen5200/irq/irq.c
@@ -367,6 +367,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/gen83xx/irq/irq.c b/bsps/powerpc/gen83xx/irq/irq.c
index 62d0ef7f96..e3d5f42d8d 100644
--- a/bsps/powerpc/gen83xx/irq/irq.c
+++ b/bsps/powerpc/gen83xx/irq/irq.c
@@ -384,6 +384,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/mpc55xxevb/start/irq.c b/bsps/powerpc/mpc55xxevb/start/irq.c
index 0c5cffd106..2a37787166 100644
--- a/bsps/powerpc/mpc55xxevb/start/irq.c
+++ b/bsps/powerpc/mpc55xxevb/start/irq.c
@@ -160,6 +160,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/mpc8260ads/irq/irq.c b/bsps/powerpc/mpc8260ads/irq/irq.c
index d4f33870d9..6bad2a9514 100644
--- a/bsps/powerpc/mpc8260ads/irq/irq.c
+++ b/bsps/powerpc/mpc8260ads/irq/irq.c
@@ -336,6 +336,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/psim/irq/irq_init.c b/bsps/powerpc/psim/irq/irq_init.c
index 4b6cf796cf..bfd373a502 100644
--- a/bsps/powerpc/psim/irq/irq_init.c
+++ b/bsps/powerpc/psim/irq/irq_init.c
@@ -110,6 +110,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/qemuppc/irq/irq_init.c b/bsps/powerpc/qemuppc/irq/irq_init.c
index b8f7f58160..e9af3d747f 100644
--- a/bsps/powerpc/qemuppc/irq/irq_init.c
+++ b/bsps/powerpc/qemuppc/irq/irq_init.c
@@ -43,6 +43,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/qoriq/irq/irq.c b/bsps/powerpc/qoriq/irq/irq.c
index c4523e3211..e6a9f09ea1 100644
--- a/bsps/powerpc/qoriq/irq/irq.c
+++ b/bsps/powerpc/qoriq/irq/irq.c
@@ -85,6 +85,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
@@ -340,6 +351,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/shared/irq/ppc-irq-generic.c b/bsps/powerpc/shared/irq/ppc-irq-generic.c
index e5d3ca56e3..4e746ba78e 100644
--- a/bsps/powerpc/shared/irq/ppc-irq-generic.c
+++ b/bsps/powerpc/shared/irq/ppc-irq-generic.c
@@ -103,6 +103,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/t32mppc/irq/irq.c b/bsps/powerpc/t32mppc/irq/irq.c
index 95c00ad583..56cb2dbb7f 100644
--- a/bsps/powerpc/t32mppc/irq/irq.c
+++ b/bsps/powerpc/t32mppc/irq/irq.c
@@ -24,6 +24,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/tqm8xx/irq/irq.c b/bsps/powerpc/tqm8xx/irq/irq.c
index 2c7e30fe60..103af361b7 100644
--- a/bsps/powerpc/tqm8xx/irq/irq.c
+++ b/bsps/powerpc/tqm8xx/irq/irq.c
@@ -71,6 +71,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/powerpc/virtex/irq/irq_init.c b/bsps/powerpc/virtex/irq/irq_init.c
index 6476fddceb..6436ee3feb 100644
--- a/bsps/powerpc/virtex/irq/irq_init.c
+++ b/bsps/powerpc/virtex/irq/irq_init.c
@@ -140,6 +140,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/riscv/griscv/irq/irq.c b/bsps/riscv/griscv/irq/irq.c
index 5572f3cba2..58ac1e9ba5 100644
--- a/bsps/riscv/griscv/irq/irq.c
+++ b/bsps/riscv/griscv/irq/irq.c
@@ -95,6 +95,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/riscv/riscv/irq/irq.c b/bsps/riscv/riscv/irq/irq.c
index 1c5ddd1dd9..d53124864a 100644
--- a/bsps/riscv/riscv/irq/irq.c
+++ b/bsps/riscv/riscv/irq/irq.c
@@ -234,6 +234,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/shared/dev/irq/arm-gicv2.c b/bsps/shared/dev/irq/arm-gicv2.c
index a9655be75c..deaae253a2 100644
--- a/bsps/shared/dev/irq/arm-gicv2.c
+++ b/bsps/shared/dev/irq/arm-gicv2.c
@@ -72,6 +72,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index 3628f5c472..f4ac4b212e 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -172,6 +172,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/shared/irq/irq-cause-clear.c b/bsps/shared/irq/irq-cause-clear.c
index f726737dcb..300ab998cc 100644
--- a/bsps/shared/irq/irq-cause-clear.c
+++ b/bsps/shared/irq/irq-cause-clear.c
@@ -41,6 +41,22 @@
 #include <rtems/score/smpimpl.h>
 #include <rtems/config.h>
 
+rtems_status_code rtems_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  if ( pending == NULL ) {
+    return RTEMS_INVALID_ADDRESS;
+  }
+
+  if ( !bsp_interrupt_is_valid_vector( vector ) ) {
+    return RTEMS_INVALID_ID;
+  }
+
+  return bsp_interrupt_is_pending( vector, pending );
+}
+
 rtems_status_code rtems_interrupt_cause( rtems_vector_number vector )
 {
   if ( !bsp_interrupt_is_valid_vector( vector ) ) {
diff --git a/bsps/shared/irq/irq-default.c b/bsps/shared/irq/irq-default.c
index 69242854ee..de8e7c3b6b 100644
--- a/bsps/shared/irq/irq-default.c
+++ b/bsps/shared/irq/irq-default.c
@@ -45,6 +45,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/sparc/leon3/start/eirq.c b/bsps/sparc/leon3/start/eirq.c
index 151726b1a5..d9bf9d4073 100644
--- a/bsps/sparc/leon3/start/eirq.c
+++ b/bsps/sparc/leon3/start/eirq.c
@@ -69,6 +69,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/sparc/shared/irq/irq-shared.c b/bsps/sparc/shared/irq/irq-shared.c
index 90262a8b8c..669a7be345 100644
--- a/bsps/sparc/shared/irq/irq-shared.c
+++ b/bsps/sparc/shared/irq/irq-shared.c
@@ -40,6 +40,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
diff --git a/bsps/x86_64/amd64/interrupts/idt.c b/bsps/x86_64/amd64/interrupts/idt.c
index cda78cb774..15081e9292 100644
--- a/bsps/x86_64/amd64/interrupts/idt.c
+++ b/bsps/x86_64/amd64/interrupts/idt.c
@@ -154,6 +154,17 @@ rtems_status_code bsp_interrupt_get_attributes(
   return RTEMS_SUCCESSFUL;
 }
 
+rtems_status_code bsp_interrupt_is_pending(
+  rtems_vector_number vector,
+  bool               *pending
+)
+{
+  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
+  bsp_interrupt_assert(pending != NULL);
+  *pending = false;
+  return RTEMS_UNSATISFIED;
+}
+
 rtems_status_code bsp_interrupt_cause(rtems_vector_number vector)
 {
   bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
-- 
2.26.2



More information about the devel mailing list