Files
Linux-Kernel-Programming_2E/questions/ch12_qs_assignments.txt
Kaiwan N Billimoria ef6d0a2b2d update ch12 qs
2023-11-02 14:22:28 +05:30

23 lines
1.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

As we conclude, here is a list of questions for you to test your knowledge
regarding this chapter's material. You will find answers to selected
questions here:
https://github.com/PacktPublishing/Linux-Kernel-Programming_2E/tree/main/solutions_to_assgn
Chapter 12 : Questions and/or Assignments
1. miscdrv_rdwr_mutextrylock:
Modify the book's
ch12/1_miscdrv_rdwr_mutexlock/miscdrv_rdwr_mutexlock.c
device driver so that it uses the *trylock* variant of the mutex lock in
the driver's write() method. If the lock is not acquired, perform some
"work" a hex dump of the driver "context" structure, perhaps ("busy-loop"
over this).
2. (If you haven't already done so) Prepare a "debug" kernel (go back to
Chapter 5, Writing Your First Kernel Module LKMs Part 2, the
'Configuring a "debug" kernel' section) and, as explained in the
'Testing the buggy module on a 6.1 debug kernel' section, run our
ch12/2_miscdrv_rdwr_spinlock buggy driver test case on it (by setting
the module parameter 'buggy' to 1).