X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fthreads.texi;h=eeb17eeac26298c6728c1349abbb5bc3a12f1222;hb=c75a1a1b7c79c1a516256b8cf072631a7aa575eb;hp=f5e60585f685a9b0e8f0779192bb6bff108abc57;hpb=5f8ae7add53756416ae4bb3240bb555e6064bd54;p=pintos-anon diff --git a/doc/threads.texi b/doc/threads.texi index f5e6058..eeb17ee 100644 --- a/doc/threads.texi +++ b/doc/threads.texi @@ -714,9 +714,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!