diff --git a/sched/pthread/pthread_create.c b/sched/pthread/pthread_create.c index c0fd3dd5aa9..9bbabb6e97e 100644 --- a/sched/pthread/pthread_create.c +++ b/sched/pthread/pthread_create.c @@ -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); } diff --git a/sched/task/task_init.c b/sched/task/task_init.c index 5cbb774fbab..270b858893e 100644 --- a/sched/task/task_init.c +++ b/sched/task/task_init.c @@ -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)