diff options
author | Russ Cox <[email protected]> | 2009-08-30 23:02:08 -0700 |
---|---|---|
committer | Russ Cox <[email protected]> | 2009-08-30 23:02:08 -0700 |
commit | 48755214c9a02d6249caf3126d3b41d67eda4730 (patch) | |
tree | 2edc8b996fd7c3ef2da8876d657140e242999d93 /proc.h | |
parent | 0aef8914959af9e472852611eb6352c211093d35 (diff) | |
download | xv6-labs-48755214c9a02d6249caf3126d3b41d67eda4730.tar.gz xv6-labs-48755214c9a02d6249caf3126d3b41d67eda4730.tar.bz2 xv6-labs-48755214c9a02d6249caf3126d3b41d67eda4730.zip |
assorted fixes:
* rename c/cp to cpu/proc
* rename cpu.context to cpu.scheduler
* fix some comments
* formatting for printout
Diffstat (limited to 'proc.h')
-rw-r--r-- | proc.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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. |