xiaoxiang781216 commented on a change in pull request #3517: URL: https://github.com/apache/incubator-nuttx/pull/3517#discussion_r611198625
########## File path: sched/sched/sched_get_stackinfo.c ########## @@ -101,5 +111,7 @@ int nxsched_get_stackinfo(pid_t pid, FAR struct stackinfo_s *stackinfo) stackinfo->adj_stack_size = qtcb->adj_stack_size; stackinfo->stack_alloc_ptr = qtcb->stack_alloc_ptr; stackinfo->adj_stack_ptr = qtcb->adj_stack_ptr; + stackinfo->tls_info_ptr = qtcb->tls_info_ptr; Review comment: > This is not good. Other than initial setup, TLS is 100% a user-space function. It must be implemented entirely in libc (the system call to get the stack base is a KLUDGE to avoid aligning stacks). But moving the TLS pointer into the TCB is just wrong. I cannot merge this kind of change. I save this poiner to fix the wrong assumption(push-down stack) you made in #987: https://github.com/apache/incubator-nuttx/commit/bda24f09c2fe0d72b3452686052d075fa7f416ae#diff-dd1838d4b8adff099b4fbcd041c8ec8e7f70cdf1fb9e360781b7298352105be6R68-R72 Two alternative select: 1. Kee the push-down stack assumption as before, and remove tls_info_ptr 2. Guard tls_info_ptr by CONFIG_TLS_ALIGNED since tls_info_ptr isn't really used in this case. Which one do you prefer? -- 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