summaryrefslogtreecommitdiff
path: root/sys/os/os_process.c
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-11-19 17:49:12 -0500
committerIan Moffett <ian@osmora.org>2025-11-19 17:49:12 -0500
commitaeebe83b0a8fbfa39f84aa714855b61fc4bab043 (patch)
tree2ec6d537d3c3369b9e277ad0e34e0ef985361a85 /sys/os/os_process.c
parenta0e0b16a5e5e0370d2312d17a250784d03b9507e (diff)
kern: proc: Add enhanced processor arbitration
Unlike the previouses systems where there was a global arbiter and a shared lock, rv7 derives a zero-based processor index by using the lower 8 bits of the pid MOD the core count. This significantly reduces contention. Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/os/os_process.c')
-rw-r--r--sys/os/os_process.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/os/os_process.c b/sys/os/os_process.c
index 6bfa220..c80dcc4 100644
--- a/sys/os/os_process.c
+++ b/sys/os/os_process.c
@@ -43,6 +43,7 @@ process_init(struct process *process, uintptr_t ip, int flags)
}
process->pid = next_pid;
+ process->affinity = -1;
atomic_inc_64(&next_pid);
mu_process_init(process, ip, flags);
return 0;