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/28 10:20:42 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on a diff in pull request #6167: arch/xtensa: Replace the xcp context with stack context to improve context switching

Ouss4 commented on code in PR #6167:
URL: https://github.com/apache/incubator-nuttx/pull/6167#discussion_r860724631


##########
arch/xtensa/src/common/xtensa_exit.c:
##########
@@ -145,7 +145,7 @@ void up_exit(int status)
 
   /* Then switch contexts */
 
-  xtensa_context_restore(tcb->xcp.regs);
+  xtensa_context_restore(&tcb->xcp.regs);

Review Comment:
   We need to pass the address of the saving area because we need it a bit below to get the coprocessor saving area.
   Otherwise we will be writing in an incorrect position and corrupt the stack. For exapmle this will make thr system crash when a task exits.



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