projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update.
[pintos-anon]
/
src
/
userprog
/
process.c
diff --git
a/src/userprog/process.c
b/src/userprog/process.c
index b9a199e64063f395924b535bfc545b4207cb4e4a..88c9d8dcae20995bb5e7dc3b4b2d5a42ca5b8e6e 100644
(file)
--- a/
src/userprog/process.c
+++ b/
src/userprog/process.c
@@
-54,6
+54,8
@@
execute_thread (void *filename_)
/* Initialize interrupt frame and load executable. */
memset (&if_, 0, sizeof if_);
/* Initialize interrupt frame and load executable. */
memset (&if_, 0, sizeof if_);
+ if_.gs = SEL_UDSEG;
+ if_.fs = SEL_UDSEG;
if_.es = SEL_UDSEG;
if_.ds = SEL_UDSEG;
if_.cs = SEL_UCSEG;
if_.es = SEL_UDSEG;
if_.ds = SEL_UDSEG;
if_.cs = SEL_UCSEG;
@@
-71,7
+73,7
@@
execute_thread (void *filename_)
/* Start the user process by simulating a return from an
interrupt, implemented by intr_exit (in
/* Start the user process by simulating a return from an
interrupt, implemented by intr_exit (in
- threads/intr-stubs.
pl
). Because intr_exit takes all of its
+ threads/intr-stubs.
S
). Because intr_exit takes all of its
arguments on the stack in the form of a `struct intr_frame',
we just point the stack pointer (%esp) to our stack frame
and jump to it. */
arguments on the stack in the form of a `struct intr_frame',
we just point the stack pointer (%esp) to our stack frame
and jump to it. */