[bootlin/training-materials updates] master: kernel: interrupts: Add the wait queue type and rename serial_wait (cef8bb8b)

Miquel Raynal miquel.raynal at bootlin.com
Tue Jun 22 18:08:33 CEST 2021


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/cef8bb8b3aebc2abbb4f4b883182b384a757410d

>---------------------------------------------------------------

commit cef8bb8b3aebc2abbb4f4b883182b384a757410d
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date:   Tue Jun 22 18:08:33 2021 +0200

    kernel: interrupts: Add the wait queue type and rename serial_wait
    
    Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>


>---------------------------------------------------------------

cef8bb8b3aebc2abbb4f4b883182b384a757410d
 labs/kernel-serial-interrupt/kernel-serial-interrupt.tex | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/labs/kernel-serial-interrupt/kernel-serial-interrupt.tex b/labs/kernel-serial-interrupt/kernel-serial-interrupt.tex
index 8d27357a..daf82ced 100644
--- a/labs/kernel-serial-interrupt/kernel-serial-interrupt.tex
+++ b/labs/kernel-serial-interrupt/kernel-serial-interrupt.tex
@@ -131,11 +131,11 @@ Now, what happens in our \code{read()} function if no character is
 available for reading (i.e, if \code{buf_wr} is equal to
 \code{buf_rd})? We should put the process to sleep!
 
-To do so, add a wait queue to our \code{serial_dev} structure,
-named for example \code{serial_wait}. In the \code{read()} function,
-keep things simple by directly using \kfunc{wait_event_interruptible}
-right from the start, to wait until \code{buf_wr}
-is different from \code{buf_rd}\footnote{A single test in the
+To do so, add a \code{wait_queue_head_t} wait queue to our
+\code{serial_dev} structure, named for example \code{wait}. In the
+\code{read()} function, keep things simple by directly using
+\kfunc{wait_event_interruptible} right from the start, to wait until
+\code{buf_wr} is different from \code{buf_rd}\footnote{A single test in the
 \kfunc{wait_event_interruptible} function is sufficient. If the
 condition is met, you don't go to sleep and read one character right away.
 Otherwise, when you wake up, you can proceed to the reading part.}.




More information about the training-materials-updates mailing list