You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/09 13:38:50 UTC

[incubator-nuttx] 03/07: arch/sim: Set idle thread stack size to zero

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch pr236
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 9a571bb116bf85b0e53f28a119fac67203a760c9
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Feb 9 20:12:51 2020 +0800

    arch/sim: Set idle thread stack size to zero
    
    to avoid ps generate "Segmentation fault" because do_stackcheck
    check the stack color if the stack size doesn't equal zero
    BTW, it is better to set idle task stack size to zero since idle
    task use the host thread and the stack size from config isn't the
    actual value.
    
    Change-Id: I82c2a8358df7cc9a7a4f200f033df1444096d688
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/sim/src/sim/up_cpuidlestack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sim/src/sim/up_cpuidlestack.c b/arch/sim/src/sim/up_cpuidlestack.c
index 04aed42..d7e3746 100644
--- a/arch/sim/src/sim/up_cpuidlestack.c
+++ b/arch/sim/src/sim/up_cpuidlestack.c
@@ -99,7 +99,7 @@ int up_cpu_idlestack(int cpu, FAR struct tcb_s *tcb, size_t stack_size)
 {
   /* REVISIT:  I don't think anything is needed here */
 
-  tcb->adj_stack_size = stack_size;
+  tcb->adj_stack_size  = 0;
   tcb->stack_alloc_ptr = NULL;
   tcb->adj_stack_ptr   = NULL;
   return OK;