Библиотека сайта rus-linux.net
The Linux Kernel Module Programming Guide
Peter Jay SalzmanMichael Burian
Ori Pomerantz
Copyright © 2001 Peter Jay Salzman
The Linux Kernel Module Programming Guide is a free book; you may reproduce and/or modify it under the terms of the Open Software License, version 1.1. You can obtain a copy of this license at http://opensource.org/licenses/osl.php.
This book is distributed in the hope it will be useful, but without any warranty, without even the implied warranty of merchantability or fitness for a particular purpose.
The author encourages wide distribution of this book for personal or commercial use, provided the above copyright notice remains intact and the method adheres to the provisions of the Open Software License. In summary, you may copy and distribute this book free of charge or for a profit. No explicit permission is required from the author for reproduction of this book in any medium, physical or electronic.
Derivative works and translations of this document must be placed under the Open Software License, and the original
copyright notice must remain intact. If you have contributed new material to this book, you must make the material and
source code available for your revisions. Please make revisions and updates available directly to the document
maintainer, Peter Jay Salzman <p@dirac.org>
. This will allow for the merging of updates and provide
consistent revisions to the Linux community.
If you publish or distribute this book commercially, donations, royalties, and/or printed copies are greatly appreciated by the author and the Linux Documentation Project (LDP). Contributing in this way shows your support for free software and the LDP. If you have questions or comments, please contact the address above.
- Table of Contents
- Foreword
- 1. Introduction
- 2. Hello World
- Hello, World (part 1): The Simplest Module
- Compiling Kernel Modules
- Hello World (part 2)
- Hello World (part 3): The
__init
and__exit
Macros - Hello World (part 4): Licensing and Module Documentation
- Passing Command Line Arguments to a Module
- Modules Spanning Multiple Files
- Building modules for a precompiled kernel
- 3. Preliminaries
- 4. Character Device Files
- 5. The /proc File System
- 6. Using /proc For Input
- 7. Talking To Device Files
- 8. System Calls
- 9. Blocking Processes
- 10. Replacing Printks
- 11. Scheduling Tasks
- 12. Interrupt Handlers
- 13. Symmetric Multi Processing
- 14. Common Pitfalls
- A. Changes: 2.0 To 2.2
- B. Where To Go From Here
- Index
- List of Figures
- 5-1. How seq_file works
- List of Examples
- 2-1. hello-1.c
- 2-2. Makefile for a basic kernel module
- 2-3. hello-2.c
- 2-4. Makefile for both our modules
- 2-5. hello-3.c
- 2-6. hello-4.c
- 2-7. hello-5.c
- 2-8. start.c
- 2-9. stop.c
- 2-10. Makefile
- 4-1. chardev.c
- 5-1. procfs1.c
- 5-2. procfs2.c
- 5-3. procfs3.c
- 5-4. procfs4.c
- 7-1. chardev.c
- 7-2. chardev.h
- 7-3. ioctl.c
- 8-1. syscall.c
- 9-1. sleep.c
- 9-2. cat_noblock.c
- 10-1. print_string.c
- 10-2. kbleds.c
- 11-1. sched.c
- 12-1. intrpt.c
Next | ||
Foreword |