summaryrefslogtreecommitdiff
path: root/proc.h
diff options
context:
space:
mode:
Diffstat (limited to 'proc.h')
-rw-r--r--proc.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/proc.h b/proc.h
index 2c7fade..c099dbf 100644
--- a/proc.h
+++ b/proc.h
@@ -31,7 +31,7 @@ struct proc {
char *mem; // Start of process memory (kernel address)
uint sz; // Size of process memory (bytes)
char *kstack; // Bottom of kernel stack for this process
- enum procstate state; // Process state
+ enum procstate state; // Process state
volatile int pid; // Process ID
struct proc *parent; // Parent process
struct trapframe *tf; // Trap frame for current syscall
@@ -51,8 +51,8 @@ struct proc {
// Per-CPU state
struct cpu {
- uchar apicid; // Local APIC ID
- struct context *context; // Switch here to enter scheduler
+ uchar id; // Local APIC ID; index into cpus[] below
+ struct context *scheduler; // Switch here to enter scheduler
struct taskstate ts; // Used by x86 to find stack for interrupt
struct segdesc gdt[NSEGS]; // x86 global descriptor table
volatile uint booted; // Has the CPU started?
@@ -70,5 +70,5 @@ extern int ncpu;
// pointed at by gs; the name __thread derives from the use
// of the same mechanism to provide per-thread storage in
// multithreaded user programs.
-extern __thread struct cpu *c; // This cpu.
-extern __thread struct proc *cp; // Current process on this cpu.
+extern __thread struct cpu *cpu; // This cpu.
+extern __thread struct proc *proc; // Current process on this cpu.