hujun260 commented on code in PR #15429: URL: https://github.com/apache/nuttx/pull/15429#discussion_r1904075549
########## arch/arm/src/armv6-m/arm_ramvec_attach.c: ########## @@ -68,7 +68,7 @@ int arm_ramvec_attach(int irq, up_vector_t vector) * common exception handler. */ - flags = enter_critical_section(); + flags = spin_lock_irqsave(&g_ramvec_lock); Review Comment: move to line 88 ########## arch/arm/src/armv7-m/arm_ramvec_attach.c: ########## @@ -68,7 +68,7 @@ int arm_ramvec_attach(int irq, up_vector_t vector) * common exception handler. */ - flags = enter_critical_section(); + flags = spin_lock_irqsave(&g_ramvec_lock); Review Comment: move to line 88 ########## arch/arm/src/armv7-m/arm_ramvec_initialize.c: ########## @@ -64,6 +64,8 @@ up_vector_t g_ram_vectors[ARMV7M_VECTAB_SIZE] locate_data(".ram_vectors") aligned_data(VECTAB_ALIGN); +spinlock_t g_ramvec_lock = SP_UNLOCKED; Review Comment: move to file arm_ramvec_attach.c and add static ########## arch/arm/src/armv8-m/arm_ramvec_attach.c: ########## @@ -68,7 +68,7 @@ int arm_ramvec_attach(int irq, up_vector_t vector) * common exception handler. */ - flags = enter_critical_section(); + flags = spin_lock_irqsave(&g_ramvec_lock); Review Comment: move to line 88 ########## arch/arm/src/armv8-m/ram_vectors.h: ########## @@ -107,6 +108,8 @@ extern up_vector_t g_ram_vectors[ARMV8M_VECTAB_SIZE] locate_data(".ram_vectors") aligned_data(VECTAB_ALIGN); +extern spinlock_t g_ramvec_lock; Review Comment: remove ########## arch/arm/src/armv6-m/arm_ramvec_initialize.c: ########## @@ -59,6 +59,8 @@ up_vector_t g_ram_vectors[ARMV6M_VECTAB_SIZE] locate_data(".ram_vectors") aligned_data(VECTAB_ALIGN); +spinlock_t g_ramvec_lock = SP_UNLOCKED; Review Comment: move to file arm_ramvec_attach.c and add static ########## arch/arm/src/armv8-m/arm_ramvec_initialize.c: ########## @@ -63,6 +63,8 @@ up_vector_t g_ram_vectors[ARMV8M_VECTAB_SIZE] locate_data(".ram_vectors") aligned_data(VECTAB_ALIGN); +spinlock_t g_ramvec_lock = SP_UNLOCKED; Review Comment: move to file arm_ramvec_attach.c and add static -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org