aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-23 23:55:22 -0400
committerIan Moffett <ian@osmora.org>2024-05-23 23:55:22 -0400
commit453ceabb2ea69217b4f66856b8813f13efd42b1e (patch)
tree85da4644580379222870520edfd866f5a0630c14 /sys
parent29ff56335c4fae316356d1d352eab0fc8795a59e (diff)
kernel: sched: Fix PID assignment
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-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 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;