sched/tls: Don't compensate the tls size to the stack size

it isn't good to change the stack size passed by caller

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-05-29 05:38:37 +08:00 committed by Petro Karashchenko
parent bd76e69f8d
commit 33a6aa2f48
2 changed files with 2 additions and 5 deletions

View File

@ -291,8 +291,7 @@ int nx_pthread_create(pthread_trampoline_t trampoline, FAR pthread_t *thread,
{
/* Allocate the stack for the TCB */
ret = up_create_stack((FAR struct tcb_s *)ptcb,
up_tls_size() + attr->stacksize,
ret = up_create_stack((FAR struct tcb_s *)ptcb, attr->stacksize,
TCB_FLAG_TTYPE_PTHREAD);
}

View File

@ -131,9 +131,7 @@ int nxtask_init(FAR struct task_tcb_s *tcb, const char *name, int priority,
{
/* Allocate the stack for the TCB */
ret = up_create_stack(&tcb->cmn,
up_tls_size() + stack_size,
ttype);
ret = up_create_stack(&tcb->cmn, stack_size, ttype);
}
if (ret < OK)