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



##########
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:
       > 
   > 
   > it isn't good to modify the common code for the arch specific need.
   
   Let me emphasize how important this is.  There are modularity rules to keep 
NuttX from degrading into spaghetti code.  This violates the core principle of 
the modular design.  There must be NO sim-specific logic outside of the 
arch/srm and boards/sim "silos"  (see 
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629399).  
The common OS MUST be completely independent of all architectures.
   
   Can you imagine what a mess it would be if everyone put platform-specific 
code throughout of the OS.  It would be a miserable mess.  We need to 
absolutely prohibit any violations of the modular architecture to keep it from 
falling into spaghetti code hell.
   




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