summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/proc.c b/proc.c
index e771c4d..45696a2 100644
--- a/proc.c
+++ b/proc.c
@@ -112,6 +112,10 @@ swtch()
acquire_spinlock(&kernel_lock);
}
+ // XXX this may be too late, should probably save on the way
+ // in, in case some other CPU decided to run curproc
+ // before we got here. in fact setting state=WAITING and
+ // setting these variables had better be atomic w.r.t. other CPUs.
op->ebp = read_ebp();
op->esp = read_esp();