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/04/19 05:38:27 UTC

[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #6099: arch/armv7-[a|r]: correct the handing of group env switch

anchao commented on code in PR #6099:
URL: https://github.com/apache/incubator-nuttx/pull/6099#discussion_r852612561


##########
arch/arm/src/armv7-r/arm_syscall.c:
##########
@@ -526,10 +535,37 @@ uint32_t *arm_syscall(uint32_t *regs)
         break;
     }
 
+#ifdef CONFIG_ARCH_ADDRENV
+  /* Check for a context switch.  If a context switch occurred, then
+   * CURRENT_REGS will have a different value than it did on entry.  If an
+   * interrupt level context switch has occurred, then establish the correct
+   * address environment before returning from the interrupt.
+   */
+
+  if (regs != CURRENT_REGS)

Review Comment:
   Done



##########
arch/arm/src/arm/arm_syscall.c:
##########
@@ -118,6 +130,13 @@ uint32_t *arm_syscall(uint32_t *regs)
         break;
     }
 
+  /* Set CURRENT_REGS to NULL to indicate that we are no longer in an
+   * interrupt handler.
+   */
+
+  regs = (uint32_t *)CURRENT_REGS;

Review Comment:
   Done



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