summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-18 15:27:55 -0400
committerIan Moffett <ian@osmora.org>2024-03-18 15:27:55 -0400
commit6828c7b57019f458988ebadd13914327312981e7 (patch)
treec819e99daf7ed6a892773a866757ddeb45159603
parent5d260b12a8e4ab7c1658a959b0452f2f741964a6 (diff)
kernel: sched: Fix PID assignment
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/kern/kern_sched.c2
1 files changed, 1 insertions, 1 deletions
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);