Sample Code Maintenance¶
Directory
_morph
holdsmy_driver.c
, which is the base for livehacking sessionsmy_driver.c
is morphed as we goBranch tree (not merged back)
Branch
my_driver_hello
Topic
Branch
Contents
The root of everything
Makefile
, buildModule loading,
init()
,exit()
.
Status
DONE
Branch
my_driver_cdev_manual
Topic
Branch
Contents
History: static device numbers
Character device basics
Status
DONE
Branch
my_driver_cdev_dynamic_major
Topic
Branch
Contents
Dynamic device number allocation
devtmpfs
andsysfs
Status
…
Branch
my_driver_cdev_file_operations
Topic
Branch
Contents
History: static device numbers
Character device basics
struct file_operations
open()
ioctl()
and_IO*()
macros
Status
DONE
Branch
my_driver_cdev_first_functionality
Topic
Branch
Contents
Doubly linked list
Basic OO
Simple
ioctl
Userspace
ioctl
usage
Status
DONE
Branch
my_driver_cdev_refactoring
Topic
Branch
Contents
Separate files
My Device encapsulation of matters
My Device as
filp->private_data
Status
DONE
Branch
my_driver_multiple_devices
Topic
Branch
Contents
…
Status
…
Branch
my_driver_mutex
Topic
Branch
Contents
Race on unprotected lists
Mutex
RT mutex
“Interruptible”
Status
DONE
Branch
my_driver_interrupt
Topic
Branch
Contents
Short GPIO introduction ⟶ move to Raspi
Request and free IRQ
Atomic?
Status
DONE
Branch
my_driver_spinlock_atomic
.Topic
Branch
Contents
Spinlock usage
Spinlock caveats (sleep/atomic)
Status
DONE
Branch
my_driver_time_timer
.Topic
Branch
Contents
jiffies
Timer wheel methods
Status
DONE
Branch
my_driver_workqueue
.Topic
Branch
Contents
Workqueue
Getting rid of atomic code
Realtime priorities
Status
DONE
Branch
my_driver_usermem
.Topic
Branch
Contents
copy_{to,from}_user()
Status
DONE
Branch
my_driver_waitqueue
.Topic
Branch
Contents
Wait queues
Blocking vs. nonblocking
read()
EAGAIN
and EOF
Status
DONE