- 博客(23)
- 资源 (4)
- 收藏
- 关注
转载 B.1. Where From Here?
I could easily have squeezed a few more chapters into this book. I could have added a chapter about creating new file systems, or about adding new protocol stacks (as if theres a need for that -- y
2007-05-29 21:12:00 445
转载 A.1. Changes between 2.0 and 2.2
A.1.1. Changes between 2.0 and 2.2I dont know the entire kernel well enough do document all of the changes. In the course of converting the examples (or actually, adapting Emmanuel Papirakiss
2007-05-29 21:11:00 439
转载 14.1. Common Pitfalls
efore I send you on your way to go out into the world and write kernel modules, there are a few things I need to warn you about. If I fail to warn you and something bad happens, please report the pro
2007-05-29 21:10:00 490
转载 13.1. Symmetrical Multi-Processing
ne of the easiest and cheapest ways to improve hardware performance is to put more than one CPU on the board. This can be done either making the different CPUs take on different jobs (asymmetrical
2007-05-29 21:08:00 813
转载 12.1. Interrupt Handlers
12.1.1. Interrupt HandlersExcept for the last chapter, everything we did in the kernel so far weve done as a response to a process asking for it, either by dealing with a special file, sending a
2007-05-29 21:04:00 869
转载 10.1. Replacing printk
n Section 1.2.1.2, I said that X and kernel module programming dont mix. Thats true for developing kernel modules, but in actual use, you want to be able to send messages to whichever tty[1] the
2007-05-29 21:02:00 489
转载 11.1. Scheduling Tasks
Very often, we have "housekeeping" tasks which have to be done at a certain time, or every so often. If the task is to be done by a process, we do it by putting it in the crontab file. If the task i
2007-05-29 21:02:00 587
转载 9.1. Blocking Processes
9.1.1. Replacing printkWhat do you do when somebody asks you for something you cant do right away? If youre a human being and youre bothered by a human being, the only thing you can say is: "
2007-05-29 21:00:00 607
转载 8.1. System Calls
So far, the only thing weve done was to use well defined kernel mechanisms to register /proc files and device handlers. This is fine if you want to do something the kernel programmers thought youd
2007-05-29 20:59:00 644
转载 7.1. Talking to Device Files (writes and IOCTLs)}
Device files are supposed to represent physical devices. Most physical devices are used for output as well as input, so there has to be some mechanism for device drivers in the kernel to get the outp
2007-05-29 20:58:00 518
转载 6.1. Using /proc For Input
So far we have two ways to generate output from kernel modules: we can register a device driver and mknod a device file, or we can create a /proc file. This allows the kernel module to tell us anyth
2007-05-29 20:57:00 418
转载 5.1. The /proc File System
n Linux there is an additional mechanism for the kernel and kernel modules to send information to processes --- the /proc file system. Originally designed to allow easy access to information about
2007-05-29 20:56:00 512
转载 4.1. Character Device Drivers
4.1.1. The file_operations StructureThe file_operations structure is defined in linux/fs.h, and holds pointers to functions defined by the driver that perform various operations on the device. E
2007-05-29 20:55:00 562
转载 3.1. Modules vs Programs
3.1.1. How modules begin and endA program usually begins with a main() function, executes a bunch of instructions and terminates upon completion of those instructions. Kernel modules work a bit
2007-05-29 20:54:00 530
转载 2.6. Passing Command Line Arguments to a Module
Modules can take command line arguments, but not with the argc/argv you might be used to.To allow arguments to be passed to your module, declare the variables that will take the values of the comma
2007-05-29 20:52:00 601
转载 2.4. Hello World (part 3): The __init and __exit Macros
This demonstrates a feature of kernel 2.2 and later. Notice the change in the definitions of the init and cleanup functions. The __init macro causes the init function to be discarded and its memory
2007-05-29 20:51:00 590
转载 2.1. Hello, World (part 1): The Simplest Module
When the first caveman programmer chiseled the first program on the walls of the first cave computer, it was a program to paint the string `Hello, world in Antelope pictures. Roman programming text
2007-05-29 20:50:00 504
转载 1.2. How Do Modules Get Into The Kernel?
You can see what modules are already loaded into the kernel by running lsmod, which gets its information by reading the file /proc/modules.How do these modules find their way into the kernel? When
2007-05-29 20:47:00 517
转载 1.1. What Is A Kernel Module?
So, you want to write a kernel module. You know C, youve written a few normal programs to run as processes, and now you want to get to where the real action is, to where a single wild pointer can w
2007-05-29 20:46:00 663
转载 Linux实用代码(1)--文件系统操作
篇文档实用性很强,它不是讲某个命令的参数具体含义,而是从实际 工作的角度来考虑,完成什么工作需要什么指令。 文件系统操作是最基本的操作,没有文件系统,操作系统根本就运行不了。 下面是我们经常要做的一些事情。在下面具体参数意义不解释,要了解这些 可以查询该命令帮助文档 1. 创建目录 mkdir NO1. 在当前路径创建一级目录
2007-05-29 19:18:00 661
转载 Linux下的软件安装
第一篇: Linux下软件的安装与卸载 在Windows下安装软件时,只需运行软件的安装程序(setup、install等)或者用zip等解压缩软件解开即可安装,运行反安装程序 (uninstall、unware、“卸载”等)就能将软件清除干净,完全图形化的操作界面,简单到只要用鼠标一直点击“下一步”就可以了。而 Linux好象就不一样了,很多的初学者都抱怨在Linux下安装和卸载软件非常
2007-05-27 21:44:00 444
转载 Linux学习笔记 初学指南
1. Linux操作系统是一个多任务网络操作系统,要求用户按照各自的身份登录上机,而不是把他们一视同仁;分配给某个用户的安全级别是在建立他或她的帐户时就设置好了的。 2. Linux操作系统目录使用正斜杠(/)而不是DOS或者windows中的反斜杠(/)。举例来说,Linux操作系统中的一个合法目录的写法是 /usr/bin。另外,Linux操作系统中大写字母和小写字母其含义将是完全不同,输
2007-05-27 21:11:00 1147
转载 第3章进程:3.2 标识符
3.2 标识符L i n u x像所有U N I X T M系统一样使用用户和组标识来检查对系统中文件和映像的访问权限。
2007-05-13 21:10:00 533
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人