Systems Design&Programming Linux Device Drivers III CMPE 310 1 (May 2, 2002)
UMBC
U M B C U N I V E R S I T Y O F M A R Y L A N D B A L T I M O R E C O U N T Y 1 9 6 6Char Drivers We’ll develop a device driver, scull, which treats an area of memory as a device. There are several types of scull devices:
- scull[0-3]
This type has four members, scull0, scull1, scull2 and scull3. Each encapsulates a memory area that is global and persistent. Global means that all opens of these devices share the same data. Persistent means that data isn’t lost across closes and reopens. Command such as cp, cat and shell I/O redirection can be used to access these devices.
- scullpipe[0-3]
Four devices that act like pipes between a reader and writer process. Blocking and non-blocking reads and writes are illustrated here.
- scullsingle, scullpriv, sculluid and scullwuid
Devices similar to scull0 with certain limitations.