From 6828c7b57019f458988ebadd13914327312981e7 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 18 Mar 2024 15:27:55 -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(-) (limited to 'sys') diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index 1fca89d..d0cd100 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -103,7 +103,7 @@ sched_enqueue_td(struct proc *td) spinlock_acquire(&tdq_lock); - td->pid = nthread++; + td->pid = ++nthread; TAILQ_INSERT_TAIL(&td_queue, td, link); spinlock_release(&tdq_lock); -- cgit v1.2.3