anchao commented on code in PR #14959:
URL: https://github.com/apache/nuttx/pull/14959#discussion_r1859496763
##########
arch/arm/include/arm/irq.h:
##########
@@ -244,6 +244,12 @@ static inline_function bool up_interrupt_context(void)
#endif
}
+noinstrument_function
+static inline_function void up_set_interrupt_context(bool flag)
Review Comment:
1. up_set_interrupt_context()/up_interrupt_context() are pair functions. It
is easier to read if they are defined in the same file place.
2. up_set_interrupt_context() is implemented differently on each
micro-architecture
a. cortex-a/r uses TPIDRPRW
b. cortex-m uses ipsr, and this architecture does not need to implement
up_set_interrupt_context()
c. The classic arm architecture and variant architecture tlsr use the
legacy global variable g_interrupt_context
The implementation on each variant architecture is different, why is it
defined in the common file?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]