[PATCH] _ARMV7M_Is_vector_an_irq: Use ARMV7M_VECTOR_SYSTICK instead of hardcoded 16

Martin Galvan martin.galvan at tallertechnologies.com
Fri Feb 19 14:32:47 UTC 2016


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)
-- 
2.7.1



More information about the devel mailing list