[bootlin/training-materials updates] master: kernel: workqueue: Mention the default queue (cc2ad5b5)

Miquel Raynal miquel.raynal at bootlin.com
Tue Oct 12 16:14:06 CEST 2021


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

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

commit cc2ad5b5d4a5b00be2e299e41fffefff81f76445
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date:   Tue Oct 12 16:10:12 2021 +0200

    kernel: workqueue: Mention the default queue
    
    In the slide we talked about queue_work() (for queueing a work in a
    specific queue) and used schedule_work() in the example without
    mentioning its purpose (the use of a default queue). Add a mention to it
    in the explanation.
    
    Reduce a little bit the size of the minted block in order to fit in the
    slide.
    
    Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>


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

cc2ad5b5d4a5b00be2e299e41fffefff81f76445
 .../kernel-driver-development-interrupts.tex                         | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex b/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex
index acae179a..3e1146c6 100644
--- a/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex
+++ b/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex
@@ -320,11 +320,12 @@ static irqreturn_t atmel_sha_irq(int irq, void *dev_id)
     \end{itemize}
   \item A workqueue, usually allocated in a per-device structure,
     is registered with \kfunc{INIT_WORK} and typically
-    triggered with \kfunc{queue_work}
+    triggered with \kfunc{queue_work} when using a dedicated queue or
+    \kfunc{schedule_work} when using the default queue
   \item The complete API, in \kfile{include/linux/workqueue.h}, provides
     many other possibilities (creating its own workqueue threads, etc.)
   \item Example (\kfile{drivers/crypto/atmel-i2c}):
-\begin{minted}{c}
+\begin{minted}[fontsize=\small]{c}
 INIT_WORK(&work_data->work, atmel_i2c_work_handler);
 schedule_work(&work_data->work);
 \end{minted}




More information about the training-materials-updates mailing list