hujun260 commented on code in PR #14596:
URL: https://github.com/apache/nuttx/pull/14596#discussion_r1827130639


##########
arch/arm/src/arm/arm_syscall.c:
##########
@@ -118,11 +122,6 @@ uint32_t *arm_syscall(uint32_t *regs)
        */
 
       case SYS_switch_context:
-        {
-          DEBUGASSERT(regs[REG_R1] != 0 && regs[REG_R2] != 0);

Review Comment:
   In some arch, empty implementations are acceptable.
   The line *(uint32_t **)regs[REG_R1] = regs; is intended to save the context, 
which can also be achieved through (*running_task)->xcp.regs = regs;
   The line up_set_current_regs((uint32_t *)regs[REG_R2]); sets the context to 
be returned to, which can be directly using tcb->xcp.regs.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to