diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-16 20:40:58 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-16 20:40:58 -0400 |
commit | d17f846427d32a104338cebccde9799c56587304 (patch) | |
tree | 2e95d41aa569a31bb5f79be5ec979388f500163f | |
parent | e551bcde3cf1bc06aba9ecac07604bdfa5970f03 (diff) |
kern/amd64: Add 'curproc' field to 'pcore'
Add a current processor field to the processor core descriptor in order
to keep track of which process is currently running.
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | src/sys/include/sys/cpuvar.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sys/include/sys/cpuvar.h b/src/sys/include/sys/cpuvar.h index 06835c6..9a2dc4d 100644 --- a/src/sys/include/sys/cpuvar.h +++ b/src/sys/include/sys/cpuvar.h @@ -32,6 +32,7 @@ #include <sys/types.h> #include <sys/cdefs.h> +#include <sys/proc.h> #if defined(_KERNEL) #include <os/sched.h> #include <machine/mdcpu.h> @@ -43,12 +44,14 @@ * independent. * * @id: Monotonic logical ID + * @curproc: Current process running * @scq: Scheduler queue * @md: Machine dependent processor information * @self: Chain pointer to self */ struct pcore { uint32_t id; + struct proc *curproc; #if defined(_KERNEL) struct sched_queue scq; struct mdcore md; |