summaryrefslogtreecommitdiff
path: root/proc.h
diff options
context:
space:
mode:
authorrtm <rtm>2006-08-10 22:08:14 +0000
committerrtm <rtm>2006-08-10 22:08:14 +0000
commit5be0039ce9e22f140a29e167526c64c723c5be3c (patch)
tree4096ed2b728cbee37dd2adee06e83f0e908f72b6 /proc.h
parent8a8be1b8c36e38f58f8ba3e425b6e701ad65abf3 (diff)
downloadxv6-labs-5be0039ce9e22f140a29e167526c64c723c5be3c.tar.gz
xv6-labs-5be0039ce9e22f140a29e167526c64c723c5be3c.tar.bz2
xv6-labs-5be0039ce9e22f140a29e167526c64c723c5be3c.zip
interrupts could be recursive since lapic_eoi() called before rti
so fast interrupts overflow the kernel stack fix: cli() before lapic_eoi()
Diffstat (limited to 'proc.h')
-rw-r--r--proc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/proc.h b/proc.h
index c6f5be6..6ed2e78 100644
--- a/proc.h
+++ b/proc.h
@@ -41,8 +41,6 @@ struct proc{
uint sz; // total size of mem, including kernel stack
char *kstack; // kernel stack, separate from mem so it doesn't move
enum proc_state state;
- enum proc_state newstate; // desired state after swtch()
- struct spinlock *mtx; // mutex for condition variable
int pid;
int ppid;
void *chan; // sleep
@@ -68,7 +66,9 @@ extern struct proc *curproc[NCPU]; // can be NULL if no proc running.
struct cpu {
uchar apicid; // Local APIC ID
struct jmpbuf jmpbuf;
+ int guard1;
char mpstack[MPSTACK]; // per-cpu start-up stack
+ int guard2;
volatile int booted;
int nlock; // # of locks currently held
struct spinlock *lastacquire; // xxx debug