Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 497 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 497 Bytes

Reader Writer Lock

This is a very simplistic module creates a character device /dev/demo_rwlock. The device implements a counter that gets incremented by a work queue once per second.

Building

To build and install this module use make and insmod.

Sample

Simple interaction with the device. Since device is created with root only permission need sudo here.

# cat /dev/demo_rwlock
27
# echo 33 >/dev/demo_rwlock
# cat /dev/demo_rwlock
39
# cat /dev/demo_rwlock
41
# rmmod rwdemo