From fb4868745cd9c8224e1d93066d0b4f4539be5689 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Wed, 7 Oct 2009 15:31:55 -0400 Subject: [PATCH 1/2] fine tune comment --- proc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proc.h b/proc.h index 192f8ff..c790634 100644 --- a/proc.h +++ b/proc.h @@ -15,7 +15,9 @@ // x86 convention is that the caller has saved them. // Contexts are stored at the bottom of the stack they // describe; the stack pointer is the address of the context. -// The layout of the context must match the code in swtch.S. +// The layout of the context matches the layout of the stack in swtch.S +// at "Switch stacks" comment. eip is included in the context +// so that allocproc() can easily change the return address on the stack. struct context { uint edi; uint esi; From ab777a9ad0355e6df16ee53bad348d5fbb1f347f Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Wed, 7 Oct 2009 17:42:14 -0400 Subject: [PATCH 2/2] fine-tune comment --- proc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proc.h b/proc.h index c790634..ebf4f2d 100644 --- a/proc.h +++ b/proc.h @@ -16,8 +16,8 @@ // Contexts are stored at the bottom of the stack they // describe; the stack pointer is the address of the context. // The layout of the context matches the layout of the stack in swtch.S -// at "Switch stacks" comment. eip is included in the context -// so that allocproc() can easily change the return address on the stack. +// at "Switch stacks" comment. Switch itself doesn't save eip explicitly, +// but it is on the stack and allocproc() manipulates it. struct context { uint edi; uint esi;