摘要:by沈东良/良少http://blog.csdn.net/shendl2011.07.19系统初始化时kernel_init在内核态创建和运行应用程序以完成系统初始化 内核刚刚启动时,只有内核态的代码,后来在init过程中,在内核态运行了一些初始化系统的程序,才产生了工作在用户空间的进程。/* This is a non __init function. Force it to be noinline otherwise gcc736 * makes it inline ...
阅读全文
随笔分类 - 源代码分析
摘要:By沈东良(良少)http://blog.csdn.net/shendl Linux内核的实现,大量使用了数据结构,包括了数组、链表和散列表。其中用的最多的是双向循环链表。Linux内核使用的是自己定义的链表和散列表,简单而高效,使用方法也非常的别具一格。 研究Linux内核的链表和散列表对于看懂Linux内核源代码有重要的意义。本文基于kernel2.6.39版本进行分析。Linux的链表和散列表定义在include...
阅读全文
摘要:p { margin-bottom: 0.21cm; }h1 { margin-bottom: 0.21cm; }h1.western { font-family: "DejaVu Sans Condensed",sans-serif; font-size: 16pt; }h1.cjk { font-family: "DejaVu Sans Condensed"; font-size: 16pt; font-style: normal; font-weight: bold; }h1.ctl { font-family: "Lohit Hindi
阅读全文
摘要:<!--@page { margin: 2cm }PRE.cjk { font-family: "DejaVu Sans", monospace }P { margin-bottom: 0.21cm }A:link { so-language: zxx }--> 内核的链表list_head设计相当巧妙。今天我说一下对list_head链表的遍历时如何删除元素。 链表遍历时,如果删除当前元素,一般都是会出错的。在所有语言的各种库中的链表都是如此。list_head也一样。<!--@page { margin: 2cm }P { margin-bottom:
阅读全文