From 6860e69bb470344a14cc55fac27506a7b7138d9e Mon Sep 17 00:00:00 2001 From: Guru Das Srinagesh Date: Thu, 11 May 2017 21:59:15 -0700 Subject: [PATCH] Add Task 17 description --- Task17/task17.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Task17/task17.txt diff --git a/Task17/task17.txt b/Task17/task17.txt new file mode 100644 index 0000000..269b3cd --- /dev/null +++ b/Task17/task17.txt @@ -0,0 +1,34 @@ +This is Task 17 of the Eudyptula Challenge +------------------------------------------ + +Another patch made and sent in. See, that wasn't so hard. Keep sending +in kernel patches outside of this challenge, those lazy kernel +developers need all the help they can get in cleaning up their code. + +It is time to start putting the different pieces of what we have done in +the past together, into a much larger module, doing more complex things. +Much more like what a "real" kernel module has to do. + +Go dig up your code from task 06, the misc char device driver, and make +the following changes: + + - Delete the read function. You don't need that anymore, so make it a + write-only misc device and be sure to set the mode of the device to + be write-only, by anyone. If you do this right, udev will set up the + node automatically with the correct permissions. + - Create a wait queue, name it "wee_wait". + - In your module init function, create a kernel thread, named of course + "eudyptula". + - The thread's main function should not do anything at this point in + time, except make sure to shutdown if asked to, and wait on the + "wee_wait" waitqueue. + - In your module exit function, shut down the kernel thread you started + up. + +Load and unload the module and "prove" that it works properly (that the +thread is created, it can be found in the process list, and that the +device node is created with the correct permission value.) Send in the +proof and the .c file for the module. + +Be sure to keep this code around, as we will be doing more with it next +time.