arch/sim: Don't add up_tls_size in up_use_stack before foward to up_create_stack

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-02-07 13:44:25 +08:00 committed by Petro Karashchenko
parent 4ee5ff81dd
commit 963feca4a1

View File

@ -119,7 +119,6 @@ int up_use_stack(FAR struct tcb_s *tcb, FAR void *stack, size_t stack_size)
* since it's impossible to extend a preallocated memory in place.
*/
return up_create_stack(tcb, up_tls_size() + stack_size,
tcb->flags & TCB_FLAG_TTYPE_MASK);
return up_create_stack(tcb, stack_size, tcb->flags & TCB_FLAG_TTYPE_MASK);
#endif
}