summaryrefslogtreecommitdiff
path: root/sys/inc/os/process.h
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/inc/os/process.h
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/inc/os/process.h')
-rw-r--r--sys/inc/os/process.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/inc/os/process.h b/sys/inc/os/process.h
index a2e3fdd..24db3e1 100644
--- a/sys/inc/os/process.h
+++ b/sys/inc/os/process.h
@@ -43,11 +43,13 @@
* system
*
* @pid: Process ID
+ * @affinity: Processor affinity
* @pcb: Process control block
* @link: Queue link
*/
struct process {
pid_t pid;
+ id_t affinity;
struct pcb pcb;
TAILQ_ENTRY(process) link;
};