sched/tls: fix thread ID initialization in tls_dup_info

Set the thread ID (tl_tid) to the destination task's pid during TLS
duplication in fork operations. This ensures the duplicated TLS info
correctly reflects the forked task's thread identifier.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5
2025-06-05 17:21:06 +08:00
committed by Xiang Xiao
parent 291938150f
commit 5fb2ff3fe9
+4
View File
@@ -77,5 +77,9 @@ int tls_dup_info(FAR struct tcb_s *dst, FAR struct tcb_s *src)
info->tl_argv = NULL;
/* Thread ID */
info->tl_tid = dst->pid;
return OK;
}