summaryrefslogtreecommitdiff
path: root/swtch.S
diff options
context:
space:
mode:
authorRuss Cox <[email protected]>2009-07-11 19:28:29 -0700
committerRuss Cox <[email protected]>2009-07-11 19:28:29 -0700
commit2c5f7aba38f8e7207a81fdef36d7720bda9dc4e5 (patch)
tree042710e617fe8e5b807314dc3a1f48c2b4a26138 /swtch.S
parentb121486c3fa2eb3c8e57fe2ae9ec0f7357da1fc1 (diff)
downloadxv6-labs-2c5f7aba38f8e7207a81fdef36d7720bda9dc4e5.tar.gz
xv6-labs-2c5f7aba38f8e7207a81fdef36d7720bda9dc4e5.tar.bz2
xv6-labs-2c5f7aba38f8e7207a81fdef36d7720bda9dc4e5.zip
initproc, usegment, swtch tweaks
Diffstat (limited to 'swtch.S')
-rw-r--r--swtch.S8
1 files changed, 5 insertions, 3 deletions
diff --git a/swtch.S b/swtch.S
index ada98f3..8751317 100644
--- a/swtch.S
+++ b/swtch.S
@@ -1,5 +1,7 @@
-# void swtch(struct context **old, struct context **new);
-#
+# Context switch
+#
+# void swtch(struct context **old, struct context *new);
+#
# Save current register context in old
# and then load register context from new.
@@ -16,7 +18,7 @@ swtch:
# Switch stacks
movl %esp, (%eax)
- movl (%edx), %esp
+ movl %edx, %esp
# Load new callee-save registers
popl %edi