diff mbox series

[PULL,3/3] bsd-user: Set TaskState ts_tid for initial threads

Message ID 20241105034039.31143-4-imp@bsdimp.com (mailing list archive)
State New
Headers show
Series [PULL,1/3] bsd-user/x86_64/target_arch_thread.h: Align stack | expand

Commit Message

Warner Losh Nov. 5, 2024, 3:40 a.m. UTC
From: Jessica Clarke <jrtc27@jrtc27.com>

Currently we only set it on fork.

Note: Upstream (blitz) commit also did new threads, but that code isn't
in qemu project repo yet.

Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Pull-Request: https://github.com/qemu-bsd-user/qemu-bsd-user/pull/52
Reviewed-by: Warner Losh <imp@bsdimp.com>
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 bsd-user/main.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 7c230b0c7a5..61ca73c4781 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -610,6 +610,7 @@  int main(int argc, char **argv)
     init_task_state(ts);
     ts->info = info;
     ts->bprm = &bprm;
+    ts->ts_tid = qemu_get_thread_id();
     cpu->opaque = ts;
 
     target_set_brk(info->brk);