The Signal driver module
Signal
Description:
This Example shows how signalling from kernel can be done to an user process.
The driver module sends the signal with send_sig() to the process that open()ed the device.
If send_sig() is called from a different context, this is usually the case from a driver interrupt
or timeout handler, the driver has to take care that the process context is stored somewhere.
In this simple example only one process is stored.
Driver inodes:
The driver inode in /dev is usually created by
mknod /dev/Signal c major minor
If another major is needed it can be specified by the
Signal_major option to insmod:
insmod Signal.o Signal_major=new_major
Driver inodes:
All driver generated with LDDK have debugging information
compiled into the code that can be configured with the dbgMask
option to insmod. The bits of dbgMask specifies the debugging verbosity:
- Bit-0 Flag for setting all options=on
- Bit-1 function entrys
- Bit-2 function exits
- Bit-3 branches
- Bit-4 data given to functions
- Bit-5 interrupts
- Bit-6 register info
- Bit-7 reserved
For example:
insmod Signal.o dbgMask=0x06
logs all function entrys and exits to the kernel log daemon.
Wed Apr 30 20:59:19 1997