From 453ceabb2ea69217b4f66856b8813f13efd42b1e Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 23 May 2024 23:55:22 -0400 Subject: kernel: sched: Fix PID assignment Signed-off-by: Ian Moffett --- sys/kern/kern_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index ccafbbc..1100f4a 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -230,7 +230,7 @@ sched_new_td(uintptr_t ip, bool is_user, struct exec_args args, struct vm_range } /* Setup initial thread state */ - td->pid = nthread++; + td->pid = ++nthread; td->tf = tf; td->addrsp = args.vas; td->is_user = is_user; -- cgit v1.2.3