Linux kernel, Software

Linux block device driver

My article about character devices is quite popular so I decided to write something about another big class of the devices in Linux – block devices. This type of devices is used to access various types of storage hardware – hard disks, SSD and so on. Here I want to describe blk-mq based devices in modern (>= 5.0) Linux kernels…

Continue Reading

Linux kernel, Linux system development, Software

C++ in Linux kernel

Linux kernel is written in C (and in Assembly in platform-specific portions) language. C language is only one allowed language to write kernel modules. And there is no problem, in most of the cases. But sometimes some stranger things may be required. Let’s see how to use C++ for the Linux kernel modules.

Linux system development

Simple Linux character device driver

A character device is one of the simplest ways to communicate with a module in the Linux kernel. These devices are presented as special files in a /dev directory and support direct reading and writing of any data, byte by byte, like a stream. Actually most of the pseudo-devices in /dev are a character device: serial ports, modems, sound, and…

Continue Reading