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 2020/08/22 13:57:14 UTC

[GitHub] [incubator-nuttx] sebastianene07 commented on a change in pull request #1602: arch/sim: Add support for preemptive scheduling in the simulator build using ucontext API

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



##########
File path: sched/task/task_setup.c
##########
@@ -593,6 +598,11 @@ static inline int nxtask_setup_stackargs(FAR struct task_tcb_s *tcb,
   stackargv[argc + 1] = NULL;
   tcb->argv = stackargv;
 
+#ifdef CONFIG_SIM_PREEMPTIBLE
+  up_setup_args_context(tcb->cmn.xcp.ucontext_buffer, tcb->cmn.start, argc,

Review comment:
       I think that it is important to follow these rules but I didn't find a better approach. I was aware of this problem during the 'ucontext' patch redesign and I mentioned it here https://github.com/apache/incubator-nuttx/pull/1009#issuecomment-671011407
   As ucontext has it's way of sending the stack arguments it can't be worked around in a better way. Do you think we can solve this more elegant ? Or we can use the first method with (sigsetjmp/siglongmp that doesn't have SMP support)




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