The Linux Kernel Module Programming Guide by Peter Jay Salzman, Michael Burian, Ori Pomerantz


By Peter Jay Salzman, Michael Burian, Ori Pomerantz

Salzman P.J., Burian M., Pomerantz O. The Linux Kernel Module Programming advisor (CreateSpace, 2009)(ISBN 1441418865)

Show description

Read Online or Download The Linux Kernel Module Programming Guide PDF

Best linux books

Sudo Mastery: User Access Control for Real People

Unix-like working platforms have a primitive entry keep an eye on approach. the basis account can do something. different clients are peasants with merely minimum approach entry. This labored tremendous in UNIX's early life, yet at the present time, approach management duties are unfold between many folks and purposes. all people wishes a tiny slice of root's energy.

Linux Administration Handbook (2nd Edition)

“As this booklet indicates, Linux platforms are only as useful, safe, and trustworthy as their proprietary opposite numbers. due to the continued efforts of hundreds of thousands of Linux builders, Linux is extra prepared than ever for deployment on the frontlines of the genuine global. The authors of this e-book comprehend that terrain good, and i'm chuffed to depart you of their so much able fingers.

PEARL 2000: Echtzeitbetriebssysteme und LINUX Workshop über Realzeitsysteme Fachtagung der GI-Fachgruppe 4.4.2 Echtzeitprogrammierung, PEARL Boppard, 23./24. November 2000

Leitthema des vorliegenden Tagungsbandes ist die Eignung von LINUX für Echtzeit-Aufgaben. Dieser Frage wird zunächst in einem Grundsatz-Beitrag nachgegangen, gefolgt von anspruchsvollen Erfahrungsberichten. Ergänzt werden sie durch Untersuchungen zur Zusammenarbeit mit digitalen Signalprozessoren. Vervollständigt wird der LINUX-Schwerpunkt durch traditionelle Themen aus der Echtzeitprogrammierung.

Additional resources for The Linux Kernel Module Programming Guide

Example text

In the example directory you will find a README and the patch. As you can imagine, such modifications are not to be taken lightly. Do not try this on valueable systems (ie systems that you do not own − or cannot restore easily). You'll need to get the complete sourcecode of this guide as a tarball in order to get the patch and the README. Depending on your kernel version, you might even need to hand apply the patch. Still here? Well, so is this chapter. If Wyle E. Coyote was a kernel hacker, this would be the first thing he'd try.

Chapter 5. 4. Manage /proc file with seq_file As we have seen, writing a /proc file may be quite "complex". So to help people writting /proc file, there is an API named seq_file that helps formating a /proc file for output. It's based on sequence, which is composed of 3 functions: start(), next(), and stop(). The seq_file API starts a sequence when a user read the /proc file. A sequence begins with the call of the function start(). If the return is a non NULL value, the function next() is called.

Read functions are used for output, whereas write functions are used for input. The reason for that is that read and write refer to the user's point of view −−− if a process reads something from the kernel, then the kernel needs to output it, and if a process writes something to the kernel, then the kernel receives it as input. Example 5−3. c − create a "file" in /proc, use the file_operation way * to manage the file. h> #define PROC_ENTRY_FILENAME #define PROCFS_MAX_SIZE /* /* /* /* We're doing kernel work */ Specifically, a module */ Necessary because we use proc fs */ for copy_*_user */ "buffer2k" 2048 /** * The buffer (2k) for this module * */ static char procfs_buffer[PROCFS_MAX_SIZE]; Chapter 5.

Download PDF sample

Rated 4.00 of 5 – based on 23 votes