wangchdo commented on code in PR #17043:
URL: https://github.com/apache/nuttx/pull/17043#discussion_r2368274973


##########
sched/sched/sched_suspendscheduler.c:
##########
@@ -68,6 +68,12 @@ void nxsched_suspend_scheduler(FAR struct tcb_s *tcb)
       return;
     }
 
+#ifdef CONFIG_TASK_STACK_OVERFLOW_CHECK
+  /* Check for stack overflow */
+
+  DEBUGASSERT(!up_check_tcbstack_overflow(tcb));

Review Comment:
   Hi, @xiaoxiang781216  I added comments on 17056 ... I don't think 17056 is a 
better one, because: 
   
   1. I don't think it is a good idea to use `up_check_tcbstack `to do this 
stack overflow check, `up_check_tcbstack `was designed for checking how many 
stack has been used, why changing it and with many update to the kernel code 
that used it?
   
   
   2, the cases that CONFIG_SCHED_SUSPENDSCHEDULER is not enabled, and the 
context switch in nxtaxk_exit were not considered
   
   3. I didn't find more feature supported .... 
   



##########
sched/sched/sched_suspendscheduler.c:
##########
@@ -68,6 +68,12 @@ void nxsched_suspend_scheduler(FAR struct tcb_s *tcb)
       return;
     }
 
+#ifdef CONFIG_TASK_STACK_OVERFLOW_CHECK
+  /* Check for stack overflow */
+
+  DEBUGASSERT(!up_check_tcbstack_overflow(tcb));

Review Comment:
   Hi, @xiaoxiang781216  I added comments on 17056 ... I don't think 17056 is a 
better one, because: 
   
   1. I don't think it is a good idea to use `up_check_tcbstack `to do this 
stack overflow check, `up_check_tcbstack `was designed for checking how many 
stack has been used, why changing it and with many update to the kernel code 
that used it?
   
   
    2, the cases that CONFIG_SCHED_SUSPENDSCHEDULER is not enabled, and the 
context switch in nxtaxk_exit were not considered
   
    3. I didn't find more feature supported .... 
   



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