sebastianene07 commented on a change in pull request #1009:
URL: https://github.com/apache/incubator-nuttx/pull/1009#discussion_r441303412



##########
File path: arch/sim/src/sim/up_releasepending.c
##########
@@ -114,7 +118,11 @@ void up_release_pending(void)
 
           /* Then switch contexts */
 
+#ifdef CONFIG_SIM_PREEMPTIBLE
+          swapcontext(&prev_rtcb->xcp.context, &rtcb->xcp.context);

Review comment:
       By looking more at this API `sigsetjmp/siglongjmp` doesn't have a direct 
way for setting the initial task context. The ucontext API has the advantage of 
having the makecontext function. We need to manually change the PC and the SP 
in the `sigjmp_buf` from the `up_initial_state` call and this should be done 
for every arch.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to