[rtems commit] _ARMV7M_Is_vector_an_irq: Use ARMV7M_VECTOR_SYSTICK instead of hardcoded 16

Joel Sherrill joel at rtems.org
Fri Feb 19 22:13:39 UTC 2016


Module:    rtems
Branch:    master
Commit:    86a276b5f3d9185db3430b91e646b334b7e20948
Changeset: http://git.rtems.org/rtems/commit/?id=86a276b5f3d9185db3430b91e646b334b7e20948

Author:    Martin Galvan <martin.galvan at tallertechnologies.com>
Date:      Fri Feb 19 11:32:47 2016 -0300

_ARMV7M_Is_vector_an_irq: Use ARMV7M_VECTOR_SYSTICK instead of hardcoded 16

Also add a comment explaining why we use that value.

---

 cpukit/score/cpu/arm/rtems/score/armv7m.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cpukit/score/cpu/arm/rtems/score/armv7m.h b/cpukit/score/cpu/arm/rtems/score/armv7m.h
index 251ecdc..0a69363 100644
--- a/cpukit/score/cpu/arm/rtems/score/armv7m.h
+++ b/cpukit/score/cpu/arm/rtems/score/armv7m.h
@@ -386,7 +386,8 @@ typedef struct {
 
 static inline bool _ARMV7M_Is_vector_an_irq( int vector )
 {
-  return vector >= 16;
+  /* External (i.e. non-system) IRQs start after the SysTick vector. */
+  return vector > ARMV7M_VECTOR_SYSTICK;
 }
 
 static inline uint32_t _ARMV7M_Get_basepri(void)



More information about the vc mailing list