Typo fixes.
[pintos-anon] / doc / userprog.texi
index 72ab25615a4f05dad6f9d7eb0f93b72886372635..67d7853bc94ee4da9910fce62bf3d90832e0abaf 100644 (file)
@@ -34,8 +34,6 @@ this illusion.
 
 Before we delve into the details of the new code that you'll be
 working with, you should probably undo the test cases from project 1.
-All you need to do is make sure the original @file{threads/test.c} is
-in place.  This will stop the tests from being run.
 
 @menu
 * Project 2 Code::              
@@ -103,7 +101,7 @@ The Task-State Segment (TSS) is used for 80@var{x}86 architectural
 task switching.  Pintos uses the TSS only for switching stacks when a
 user process enters an interrupt handler, as does Linux.  @strong{You
 should not need to modify these files for any of the projects.}
-However, you can read the code if you're interested in how the GDT
+However, you can read the code if you're interested in how the TSS
 works.
 @end table
 
@@ -481,21 +479,21 @@ provide a little bit of helpful code:
 @example
 /* Tries to copy a byte from user address USRC to kernel address DST.
    Returns true if successful, false if USRC is invalid. */
-static inline bool get_user (uint8_t *dst, const uint8_t *usrc) @{
+static inline bool get_user (uint8_t *dst, const uint8_t *usrc) {
   int eax;
   asm ("movl $1f, %%eax; movb %2, %%al; movb %%al, %0; 1:"
        : "=m" (*dst), "=&a" (eax) : "m" (*usrc));
   return eax != 0;
-@}
+}
 
 /* Tries write BYTE to user address UDST.
    Returns true if successful, false if UDST is invalid. */
-static inline bool put_user (uint8_t *udst, uint8_t byte) @{
+static inline bool put_user (uint8_t *udst, uint8_t byte) {
   int eax;
   asm ("movl $1f, %%eax; movb %b2, %0; 1:"
        : "=m" (*udst), "=&a" (eax) : "r" (byte));
   return eax != 0;
-@}
+}
 @end example
 
 Each of these functions assumes that the user address has already been
@@ -592,7 +590,7 @@ This value, the exit status of the process, must be returned to the
 thread's parent when @func{join} is called.
 
 @item
-@b{Can I just cast a pointer to a @code{struct file} object to get a
+@b{Can I just cast a pointer to a @struct{file} object to get a
 unique file descriptor?  Can I just cast a @code{struct thread *} to a
 @code{pid_t}?  It's so much simpler that way!}
 
@@ -688,7 +686,7 @@ some of your caches.  This is why inlining code can be much faster.
 @end menu
 
 @node Argument Passing to main
-@subsection Argument Passing to @func{main}
+@subsection Argument Passing to @code{main()}
 
 In @func{main}'s case, there is no caller to prepare the stack
 before it runs.  Therefore, the kernel needs to do it.  Fortunately,
@@ -787,7 +785,7 @@ user program (assuming for this example that the stack bottom is
 @item @t{0xbfffffe0} @tab @code{argv[2]} @tab @t{0xbffffff8}
 @item @t{0xbfffffdc} @tab @code{argv[1]} @tab @t{0xbffffff5}
 @item @t{0xbfffffd8} @tab @code{argv[0]} @tab @t{0xbfffffed}
-@item @t{0xbfffffd4} @tab @code{argv} @tab @t{0xbffffffd8}
+@item @t{0xbfffffd4} @tab @code{argv} @tab @t{0xbfffffd8}
 @item @t{0xbfffffd0} @tab @code{argc} @tab 4
 @item @t{0xbfffffcc} @tab ``return address'' @tab 0
 @end multitable
@@ -868,4 +866,4 @@ In this example, the caller's stack pointer would be at
 
 The 80@var{x}86 convention for function return values is to place them
 in the @samp{EAX} register.  System calls that return a value can do
-so by modifying the @samp{eax} member of @code{struct intr_frame}.
+so by modifying the @samp{eax} member of @struct{intr_frame}.