From: Ben Pfaff Date: Sun, 9 Apr 2006 20:01:51 +0000 (+0000) Subject: Fix wrong explanation of sleeping in an interrupt handler. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d954fd86cdbdfbbc99429d7ab4248c2e872e151;p=pintos-anon Fix wrong explanation of sleeping in an interrupt handler. Thanks to Godmar Back for reporting this bug. --- diff --git a/doc/tour.texi b/doc/tour.texi index f4760ec..c1371cf 100644 --- a/doc/tour.texi +++ b/doc/tour.texi @@ -1093,9 +1093,9 @@ Second, an interrupt handler must not call any function that can sleep, which rules out @func{thread_yield}, @func{lock_acquire}, and many others. This is because external interrupts use space on the stack of the kernel thread that was running at the time the interrupt -occurred. If the interrupt handler tried to sleep and that thread -resumed, then the two uses of the single stack would interfere, which -cannot be allowed. +occurred. If the interrupt handler slept, it would effectively put that +thread to sleep too until the interrupt handler resumed control and +returned. Because an external interrupt runs with interrupts disabled, it effectively monopolizes the machine and delays all other activities.