sebastianene07 commented on a change in pull request #1602:
URL: https://github.com/apache/incubator-nuttx/pull/1602#discussion_r477285445
##########
File path: arch/sim/src/sim/up_interruptcontext.c
##########
@@ -43,10 +43,49 @@
#include <nuttx/arch.h>
#include "up_internal.h"
+#ifdef CONFIG_SIM_PREEMPTIBLE
+uint32_t host_signal_save(void);
+void host_signal_restore(uint32_t flags);
+int up_cpu_simulated_interrupt(void);
+#else
+# define host_signal_save() 0
+# define host_signal_restore(f) (void)(f)
+# define up_cpu_simulated_interrupt() 0
+#endif
+
/****************************************************************************
* Public Functions
****************************************************************************/
+/****************************************************************************
+ * Name: up_irq_save
+ *
+ * Description:
+ * Disable interrupts and returned the mask before disabling them.
+ *
+ ****************************************************************************/
+
+irqstate_t up_irq_save(void)
+{
+ return host_signal_save();
Review comment:
That's correct, I'm thinking of moving the up_irq_save/up_irq_restore
implementation to a separate patch as it can be decoupled from this large change
----------------------------------------------------------------
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:
[email protected]