mirror of
https://github.com/apache/nuttx.git
synced 2026-05-18 00:34:10 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user