Linux Driver Code

Table of Contents

1 Virtual Mouse Driver

I wrote a virtual mouse driver to use keyboard to control mouse cursor.
Usage:

  • Ctr+Alt+p: move cursor upward
  • Ctr+Alt+n: move cursor down
  • Ctr+Alt+b: move cursor left
  • Ctr+Alt+f: move cursor right
  • Ctr+Alt+Space: left mouse button clicked
  • Ctr+Alt+m: right mouse button clicked
  • Alt+u: wheel scroll up
  • Alt+v: Wheel scroll down
  • Capslock: lock speed

virtual mouse driver code

2 A simple file system: qfs

qfs is a simple file system just has one file.

qfs code

3 A stackable file system: maskfs

maskfs is modified from ecryptfs, I used it to mask all files in a directory, and want to say: what you saw is not necessarily true.

maskfs code

4 Wait Queue Example

5 Timer Example

6 Kernel Locking Mechanism

7 Work Deferring Mechanism

Author: Yanqing Li

Created: 2019-04-22 一 21:28

Validate