X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fthreads.texi;h=706f76b7f035e5b7c0e17755dc5c7750aed4d34d;hb=fd24c2387f5cf1b802e885c7430ba1f1bb852e13;hp=f5e60585f685a9b0e8f0779192bb6bff108abc57;hpb=2791793b038dec7e3365d6570bff5c3afaaa188c;p=pintos-anon diff --git a/doc/threads.texi b/doc/threads.texi index f5e6058..706f76b 100644 --- a/doc/threads.texi +++ b/doc/threads.texi @@ -217,14 +217,24 @@ call this code yourself. @item serial.c @itemx serial.h Serial port driver. Again, @func{printf} calls this code for you, -so you don't need to do so yourself. Feel free to look through it if -you're curious. +so you don't need to do so yourself. +It handles serial input by passing it to the input layer (see below). @item disk.c @itemx disk.h Supports reading and writing sectors on up to 4 IDE disks. This won't actually be used until project 2. +@item kbd.c +@itemx kbd.h +Keyboard driver. Handles keystrokes passing them to the input layer +(see below). + +@item input.c +@itemx input.h +Input layer. Queues input characters passed along by the keyboard or +serial drivers. + @item intq.c @itemx intq.h Interrupt queue, for managing a circular queue that both kernel @@ -714,9 +724,11 @@ preempting whatever thread is currently running. @item How does @func{thread_set_priority} affect a thread receiving donations? -It should do something sensible, but no particular behavior is -required. None of the test cases call @func{thread_set_priority} from a -thread while it is receiving a priority donation. +It sets the thread's base priority. The thread's effective priority +becomes the higher of the newly set priority or the highest donated +priority. When the donations are released, the thread's priority +becomes the one set through the function call. This behavior is checked +by the @code{priority-donate-lower} test. @item Calling @func{printf} in @func{sema_up} or @func{sema_down} reboots!