Commit ebd8803b authored by Dominik Ermel's avatar Dominik Ermel Committed by Benjamin Cabé
Browse files

arch: arm: cortex_m: Rephrase comment on IRQ decrement

Move and rephrase the comment to better explain reason why obtained
IRQ number is decremented.

Signed-off-by: default avatarDominik Ermel <dominik.ermel@nordicsemi.no>
parent f5691120
Loading
Loading
Loading
Loading
+4 −1
Changes for arch/arm/core/cortex_m/isr_wrapper.c: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -68,9 +68,12 @@ void _isr_wrapper(void)
#if defined(CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER)
	int32_t irq_number = z_soc_irq_get_active();
#else
	/* _sw_isr_table does not map the exceptions, only the interrupts. */
	int32_t irq_number = __get_IPSR();
#endif
	/* _sw_isr_table does not map the core system exceptions,
	 * which take first 16 interrupt numbers, only the external
	 * interrupts.
	 */
	irq_number -= 16;

	struct _isr_table_entry *entry = &_sw_isr_table[irq_number];