Sample Code Maintenance#
Directory
_morphholdsmy_driver.c, which is the base for livehacking sessionsmy_driver.cis morphed as we goBranch tree (not merged back)
Branch
my_driver_helloTopic
Branch
Contents
The root of everything
Makefile, buildModule loading,
init(),exit().
Status
DONE
Branch
my_driver_cdev_manualTopic
Branch
Contents
History: static device numbers
Character device basics
Status
DONE
Branch
my_driver_cdev_dynamic_majorTopic
Branch
Contents
Dynamic device number allocation
devtmpfsandsysfs
Status
…
Branch
my_driver_cdev_file_operationsTopic
Branch
Contents
History: static device numbers
Character device basics
struct file_operationsopen()ioctl()and_IO*()macros
Status
DONE
Branch
my_driver_cdev_first_functionalityTopic
Branch
Contents
Doubly linked list
Basic OO
Simple
ioctlUserspace
ioctlusage
Status
DONE
Branch
my_driver_cdev_refactoringTopic
Branch
Contents
Separate files
My Device encapsulation of matters
My Device as
filp->private_data
Status
DONE
Branch
my_driver_multiple_devicesTopic
Branch
Contents
…
Status
…
Branch
my_driver_mutexTopic
Branch
Contents
Race on unprotected lists
Mutex
RT mutex
“Interruptible”
Status
DONE
Branch
my_driver_interruptTopic
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
jiffiesTimer 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()EAGAINand EOF
Status
DONE