summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-11-05 09:56:16 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-11-06 14:05:53 +0100
commit350bba7a04c7dd0c9e5fa0cd0aee33be564283a5 (patch)
tree96a9b279bc93856476a39f0fc80f7fb06ba9ad00 /cpukit/score/cpu
parentsparc: Add SPARC_INTERRUPT_TRAP_TO_SOURCE() (diff)
downloadrtems-350bba7a04c7dd0c9e5fa0cd0aee33be564283a5.tar.bz2
sparc: Add SPARC_INTERRUPT_SOURCE_TO_TRAP()
Update #4171.
Diffstat (limited to 'cpukit/score/cpu')
-rw-r--r--cpukit/score/cpu/sparc/include/rtems/score/sparc.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/cpukit/score/cpu/sparc/include/rtems/score/sparc.h b/cpukit/score/cpu/sparc/include/rtems/score/sparc.h
index 182281f394..a65acb89b1 100644
--- a/cpukit/score/cpu/sparc/include/rtems/score/sparc.h
+++ b/cpukit/score/cpu/sparc/include/rtems/score/sparc.h
@@ -240,6 +240,18 @@ extern "C" {
#define SPARC_INTERRUPT_TRAP_TO_SOURCE( _trap ) \
( SPARC_REAL_TRAP_NUMBER( _trap ) - 0x10 )
+/**
+ * @brief Maps the interrupt source number to the associated asynchronous trap
+ * number.
+ *
+ * @param _source is the interrupt source number to map.
+ *
+ * @return Returns the asynchronous trap number associated with the interrupt
+ * source number.
+ */
+#define SPARC_INTERRUPT_SOURCE_TO_TRAP( _source ) \
+ ( SPARC_ASYNCHRONOUS_TRAP( _source ) + 0x10 )
+
#ifndef ASM
/**