You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/05/17 19:57:08 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6286: arch: inline up_interrupt_context()

pkarashchenko commented on code in PR #6286:
URL: https://github.com/apache/incubator-nuttx/pull/6286#discussion_r875209678


##########
arch/arm/include/irq.h:
##########
@@ -29,6 +29,12 @@
  * Included Files
  ****************************************************************************/
 
+#include <nuttx/config.h>
+#ifndef __ASSEMBLY__
+#  include <stdbool.h>
+#  include <sys/types.h>

Review Comment:
   I think `sys/types.h` can be moved out of `ifndef __ASSEMBLY__`



##########
arch/avr/include/irq.h:
##########
@@ -55,19 +60,25 @@
  * Public Types
  ****************************************************************************/
 
-/****************************************************************************
- * Inline functions
- ****************************************************************************/
-
 /****************************************************************************
  * Public Data
  ****************************************************************************/
 
+#ifndef __ASSEMBLY__
+/* This holds a references to the current interrupt level register storage
+ * structure.  If is non-NULL only during interrupt processing.
+ */
+
+#ifdef CONFIG_ARCH_FAMILY_AVR32
+extern volatile uint32_t *g_current_regs;

Review Comment:
   ```suggestion
   EXTERN volatile uint32_t *g_current_regs;
   ```



##########
arch/hc/include/irq.h:
##########
@@ -55,14 +60,38 @@
  * Public Types
  ****************************************************************************/
 
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+/* This holds a references to the current interrupt level register storage
+ * structure.  If is non-NULL only during interrupt processing.
+ */
+
+extern volatile uint8_t *g_current_regs;

Review Comment:
   ```suggestion
   EXTERN volatile uint8_t *g_current_regs;
   ```



##########
arch/avr/include/irq.h:
##########
@@ -29,6 +29,11 @@
  * Included Files
  ****************************************************************************/
 
+#ifndef __ASSEMBLY__
+#  include <stdbool.h>
+#  include <sys/types.h>

Review Comment:
   can move this out of `__ASSEMBLY__`



##########
arch/mips/include/irq.h:
##########
@@ -55,14 +60,23 @@
 
 #ifndef __ASSEMBLY__
 
-/****************************************************************************
- * Inline functions
- ****************************************************************************/
-
 /****************************************************************************
  * Public Data
  ****************************************************************************/
 
+/* g_current_regs holds a references to the current interrupt level
+ * register storage structure.  It is non-NULL only during interrupt
+ * processing.  Access to g_current_regs must be through the macro
+ * CURRENT_REGS for portability.
+ */
+
+/* For the case of architectures with multiple CPUs, then there must be one
+ * such value for each processor that can receive an interrupt.
+ */
+
+extern volatile uint32_t *g_current_regs[CONFIG_SMP_NCPUS];

Review Comment:
   ```suggestion
   EXTERN volatile uint32_t *g_current_regs[CONFIG_SMP_NCPUS];
   ```



-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org