doc(lab02): start doc for ex7
This commit is contained in:
@@ -384,6 +384,15 @@ Easy exercice, a thread in the kernet is a `struct task_struct*` that can be cre
|
||||
]
|
||||
)
|
||||
|
||||
This exercice make 2 threads in concurrency with wait queue. Here the queue ware declare
|
||||
statically with the macro `DECLARE_WAIT_QUEUE_HEAD`. Then for this exercice we use an atomic
|
||||
trigger with 2 queues. It important that the trigger is atomic or protected by mutex because
|
||||
there is concurrency. The wait queues are used to wait until the trigger has changed to keep
|
||||
synchronization between the threads.
|
||||
|
||||
It is very important to add `kthread_should_stop()` as a condition to wake up queue, because if there is
|
||||
a problem during the implementation, we cannot kill the code.
|
||||
|
||||
//-------------------
|
||||
// Exercise 8: Interrupts
|
||||
//-------------------
|
||||
|
||||
Reference in New Issue
Block a user