In order to prepare a simple example about waiting queues, we can again use a kernel module where we define a kernel timer during the module initialization function, which has the task of generating our event, and then we use a waitqueue or completion to wait for it.
In the chapter_05/wait_event directory of GitHub resources, there are two simple examples about waitqueues and completions, then, in the How it works... section, we're going to explain them in detail.