Correct a comment

Fix comment in libs/libc/tls/tls_getinfo.c:  The TLS data must lie at the beginning of the allocated stack memory for both push-up and push-down stacks.
This commit is contained in:
Gregory Nutt 2021-04-11 10:36:32 -06:00 committed by Xiang Xiao
parent ac5fb7d701
commit 2882551299

View File

@ -63,8 +63,8 @@ FAR struct tls_info_s *tls_get_info(void)
ret = nxsched_get_stackinfo(0, &stackinfo); ret = nxsched_get_stackinfo(0, &stackinfo);
if (ret >= 0) if (ret >= 0)
{ {
/* This currently assumes a push-down stack. The TLS data lies at the /* The TLS data lies at the lowest address of the stack allocation.
* lowest address of the stack allocation. * This is true for both push-up and push-down stacks.
*/ */
info = (FAR struct tls_info_s *)stackinfo.stack_alloc_ptr; info = (FAR struct tls_info_s *)stackinfo.stack_alloc_ptr;