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


##########
include/nuttx/arch.h:
##########
@@ -2564,6 +2564,9 @@ void irq_dispatch(int irq, FAR void *context);
 #ifdef CONFIG_STACK_COLORATION
 struct tcb_s;
 size_t up_check_tcbstack(FAR struct tcb_s *tcb);
+#ifdef CONFIG_TASK_STACK_OVERFLOW_CHECK
+bool up_check_tcbstack_overflow(FAR struct tcb_s *tcb);

Review Comment:
   The threashold here is the minimum stack size left threshold(default value 
is 16), this stack overflow checking mechanism does not need to know exactly 
how many stack used or left, it just need to know the stack left is bigger than 
the threshold or not, so the maximum loop in stackoverflow checking is 4 times 
if the threshold is 16, which is very efficient



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to