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 2021/04/20 18:11:19 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3580: arch: move up_irq{save|restore} to irq.h

gustavonihei commented on a change in pull request #3580:
URL: https://github.com/apache/incubator-nuttx/pull/3580#discussion_r616928005



##########
File path: arch/risc-v/include/bl602/irq.h
##########
@@ -224,8 +224,49 @@ extern "C"
  * Public Function Prototypes
  ****************************************************************************/
 
+/****************************************************************************
+ * Name: up_irq_enable
+ *
+ * Description:
+ *   Return the current interrupt state and enable interrupts
+ *
+ ****************************************************************************/
+
 EXTERN irqstate_t up_irq_enable(void);
 
+/****************************************************************************
+ * Name: up_irq_save
+ *
+ * Description:
+ *   Save the current interrupt state and disable interrupts.
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   Interrupt state prior to disabling interrupts.
+ *
+ ****************************************************************************/
+
+EXTERN irqstate_t up_irq_save(void);

Review comment:
       This seems a bit weird.
   `up_irq_save` is already declared at `arch/risc-v/include/irq.h`, which is already included in `bl602_irq.c` as `<arch/irq.h>`.
   If this patch is really necessary, there might be something wrong with the include paths.




-- 
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.

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