?? index.html
字號(hào):
<div class="toc">
<p><b>目錄</b></p>
<dl>
<dt><span class="chapter"><a href="ch01.html">1. 第一章 設(shè)備驅(qū)動(dòng)簡(jiǎn)介</a></span></dt>
<dd><dl>
<dt><span class="sect1"><a href="ch01.html#TheRoleoftheDeviceDriver.sect1">1.1. 驅(qū)動(dòng)程序的角色</a></span></dt>
<dt><span class="sect1"><a href="ch01s02.html">1.2. 劃分內(nèi)核</a></span></dt>
<dd><dl><dt><span class="sect2"><a href="ch01s02.html#LoadableModules.sect2">1.2.1. 可加載模塊</a></span></dt></dl></dd>
<dt><span class="sect1"><a href="ch01s03.html">1.3. 設(shè)備和模塊的分類(lèi)</a></span></dt>
<dt><span class="sect1"><a href="ch01s04.html">1.4. 安全問(wèn)題</a></span></dt>
<dt><span class="sect1"><a href="ch01s05.html">1.5. 版本編號(hào)</a></span></dt>
<dt><span class="sect1"><a href="ch01s06.html">1.6. 版權(quán)條款</a></span></dt>
<dt><span class="sect1"><a href="ch01s07.html">1.7. 加入內(nèi)核開(kāi)發(fā)社團(tuán)</a></span></dt>
<dt><span class="sect1"><a href="ch01s08.html">1.8. 本書(shū)的內(nèi)容</a></span></dt>
</dl></dd>
<dt><span class="chapter"><a href="ch02.html">2. 建立和運(yùn)行模塊</a></span></dt>
<dd><dl>
<dt><span class="sect1"><a href="ch02.html#SettingUpYourTestSystem.sect1">2.1. 設(shè)置你的測(cè)試系統(tǒng)</a></span></dt>
<dt><span class="sect1"><a href="ch02s02.html">2.2. Hello World 模塊</a></span></dt>
<dt><span class="sect1"><a href="ch02s03.html">2.3. 內(nèi)核模塊相比于應(yīng)用程序</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch02s03.html#UserSpaceandKernelSpace.sect2">2.3.1. 用戶(hù)空間和內(nèi)核空間</a></span></dt>
<dt><span class="sect2"><a href="ch02s03.html#ConcurrencyintheKernel.sect2">2.3.2. 內(nèi)核的并發(fā)</a></span></dt>
<dt><span class="sect2"><a href="ch02s03.html#TheCurrentProcess.sect2">2.3.3. 當(dāng)前進(jìn)程</a></span></dt>
<dt><span class="sect2"><a href="ch02s03.html#AFewOtherDetails.sect2">2.3.4. 幾個(gè)別的細(xì)節(jié)</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch02s04.html">2.4. 編譯和加載</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch02s04.html#CompilingModules.sect2">2.4.1. 編譯模塊</a></span></dt>
<dt><span class="sect2"><a href="ch02s04.html#LoadingandUnloadingModules.sect2">2.4.2. 加載和卸載模塊</a></span></dt>
<dt><span class="sect2"><a href="ch02s04.html#VersionDependency.sect2">2.4.3. 版本依賴(lài)</a></span></dt>
<dt><span class="sect2"><a href="ch02s04.html#PlatformDependency.sect2">2.4.4. 平臺(tái)依賴(lài)性</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch02s05.html">2.5. 內(nèi)核符號(hào)表</a></span></dt>
<dt><span class="sect1"><a href="ch02s06.html">2.6. 預(yù)備知識(shí)</a></span></dt>
<dt><span class="sect1"><a href="ch02s07.html">2.7. 初始化和關(guān)停</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch02s07.html#TheCleanupFunction.sect2">2.7.1. 清理函數(shù)</a></span></dt>
<dt><span class="sect2"><a href="ch02s07.html#ErrorHandlingDuringInitialization.sect2">2.7.2. 初始化中的錯(cuò)誤處理</a></span></dt>
<dt><span class="sect2"><a href="ch02s07.html#ModuleLoadingRaces.sect2">2.7.3. 模塊加載競(jìng)爭(zhēng)</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch02s08.html">2.8. 模塊參數(shù)</a></span></dt>
<dt><span class="sect1"><a href="ch02s09.html">2.9. 在用戶(hù)空間做</a></span></dt>
<dt><span class="sect1"><a href="ch02s10.html">2.10. 快速參考</a></span></dt>
</dl></dd>
<dt><span class="chapter"><a href="ch03.html">3. 字符驅(qū)動(dòng)</a></span></dt>
<dd><dl>
<dt><span class="sect1"><a href="ch03.html#TheDesignofscull.sect">3.1. scull 的設(shè)計(jì)</a></span></dt>
<dt><span class="sect1"><a href="ch03s02.html">3.2. 主次編號(hào)</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch03s02.html#TheInternalRepresentationofDeviceNumber.sect">3.2.1. 設(shè)備編號(hào)的內(nèi)部表示</a></span></dt>
<dt><span class="sect2"><a href="ch03s02.html#AllocatingandFreeingDeviceNumbers.sect">3.2.2. 分配和釋放設(shè)備編號(hào)</a></span></dt>
<dt><span class="sect2"><a href="ch03s02.html#DynamicAllocaionofMajorNumbers.sect">3.2.3. 主編號(hào)的動(dòng)態(tài)分配</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch03s03.html">3.3. 一些重要數(shù)據(jù)結(jié)構(gòu)</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch03s03.html#FileOperation.sect">3.3.1. 文件操作</a></span></dt>
<dt><span class="sect2"><a href="ch03s03.html#ThefileStructure.sect">3.3.2. 文件結(jié)構(gòu)</a></span></dt>
<dt><span class="sect2"><a href="ch03s03.html#TheinodeStructure.sect">3.3.3. inode 結(jié)構(gòu)</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch03s04.html">3.4. 字符設(shè)備注冊(cè)</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch03s04.html#DeviceRegistrationinscull.sect">3.4.1. scull 中的設(shè)備注冊(cè)</a></span></dt>
<dt><span class="sect2"><a href="ch03s04.html#TheOlderWay.sect">3.4.2. 老方法</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch03s05.html">3.5. open 和 release</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch03s05.html#TheopenMethod.sect">3.5.1. open 方法</a></span></dt>
<dt><span class="sect2"><a href="ch03s05.html#ThereleaseMethod.sect">3.5.2. release 方法</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch03s06.html">3.6. scull 的內(nèi)存使用</a></span></dt>
<dt><span class="sect1"><a href="ch03s07.html">3.7. 讀和寫(xiě)</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch03s07.html#ThereadMethod.sect">3.7.1. read 方法</a></span></dt>
<dt><span class="sect2"><a href="ch03s07.html#ThewriteMethod.sect">3.7.2. write 方法</a></span></dt>
<dt><span class="sect2"><a href="ch03s07.html#readvandwritev.sect">3.7.3. readv 和 writev</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch03s08.html">3.8. 使用新設(shè)備</a></span></dt>
<dt><span class="sect1"><a href="ch03s09.html">3.9. 快速參考</a></span></dt>
</dl></dd>
<dt><span class="chapter"><a href="ch04.html">4. 調(diào)試技術(shù)</a></span></dt>
<dd><dl>
<dt><span class="sect1"><a href="ch04.html#DebuggingSupportintheKernel.sect">4.1. 內(nèi)核中的調(diào)試支持</a></span></dt>
<dt><span class="sect1"><a href="ch04s02.html">4.2. 用打印調(diào)試</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch04s02.html#printk">4.2.1. printk</a></span></dt>
<dt><span class="sect2"><a href="ch04s02.html#RedirectingConsoleMessages">4.2.2. 重定向控制臺(tái)消息</a></span></dt>
<dt><span class="sect2"><a href="ch04s02.html#HowMessageGetLogged">4.2.3. 消息是如何記錄的</a></span></dt>
<dt><span class="sect2"><a href="ch04s02.html#TurningtheMessagesOnandOff">4.2.4. 打開(kāi)和關(guān)閉消息</a></span></dt>
<dt><span class="sect2"><a href="ch04s02.html#RateLimiting">4.2.5. 速率限制</a></span></dt>
<dt><span class="sect2"><a href="ch04s02.html#PrintingDeviceNumbers">4.2.6. 打印設(shè)備編號(hào)</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch04s03.html">4.3. 用查詢(xún)來(lái)調(diào)試</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch04s03.html#UsingtheprocFilesystem">4.3.1. 使用 /proc 文件系統(tǒng)</a></span></dt>
<dt><span class="sect2"><a href="ch04s03.html#TheioctlMethod.sect">4.3.2. ioctl 方法</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch04s04.html">4.4. 使用觀(guān)察來(lái)調(diào)試</a></span></dt>
<dt><span class="sect1"><a href="ch04s05.html">4.5. 調(diào)試系統(tǒng)故障</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch04s05.html#OopsMessages.scet">4.5.1. oops 消息</a></span></dt>
<dt><span class="sect2"><a href="ch04s05.html#SystemHange.sect">4.5.2. 系統(tǒng)掛起</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch04s06.html">4.6. 調(diào)試器和相關(guān)工具</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch04s06.html#Usinggdb.sect">4.6.1. 使用 gdb</a></span></dt>
<dt><span class="sect2"><a href="ch04s06.html#ThekdbKernelDebugger.sect">4.6.2. kdb 內(nèi)核調(diào)試器</a></span></dt>
<dt><span class="sect2"><a href="ch04s06.html#ThekgdbPatches.sect">4.6.3. kgdb 補(bǔ)丁</a></span></dt>
<dt><span class="sect2"><a href="ch04s06.html#TheUserModeLinuxPort.sect">4.6.4. 用戶(hù)模式 Linux 移植</a></span></dt>
<dt><span class="sect2"><a href="ch04s06.html#TheLinuxTraceToolkit.sect">4.6.5. Linux 追蹤工具</a></span></dt>
<dt><span class="sect2"><a href="ch04s06.html#DynamicProbes.sect">4.6.6. 動(dòng)態(tài)探針</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="chapter"><a href="ch05.html">5. 并發(fā)和競(jìng)爭(zhēng)情況</a></span></dt>
<dd><dl>
<dt><span class="sect1"><a href="ch05.html#Pitfallsinscull.sect">5.1. scull 中的缺陷</a></span></dt>
<dt><span class="sect1"><a href="ch05s02.html">5.2. 并發(fā)和它的管理</a></span></dt>
<dt><span class="sect1"><a href="ch05s03.html">5.3. 旗標(biāo)和互斥體</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch05s03.html#TheLinuxSemaphoreImplementation.sect">5.3.1. Linux 旗標(biāo)實(shí)現(xiàn)</a></span></dt>
<dt><span class="sect2"><a href="ch05s03.html#UsingSemaphoresinscull.sect">5.3.2. 在 scull 中使用旗標(biāo)</a></span></dt>
<dt><span class="sect2"><a href="ch05s03.html#ReaderWriterSemphores.sect">5.3.3. 讀者/寫(xiě)者旗標(biāo)</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch05s04.html">5.4. Completions 機(jī)制</a></span></dt>
<dt><span class="sect1"><a href="ch05s05.html">5.5. 自旋鎖</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch05s05.html#IntroductiontotheSpinlockAPI.sect">5.5.1. 自旋鎖 API 簡(jiǎn)介</a></span></dt>
<dt><span class="sect2"><a href="ch05s05.html#SpinlocksandAtomicContext.sect">5.5.2. 自旋鎖和原子上下文</a></span></dt>
<dt><span class="sect2"><a href="ch05s05.html#TheSpinlockFunctions.sect">5.5.3. 自旋鎖函數(shù)</a></span></dt>
<dt><span class="sect2"><a href="ch05s05.html#ReaderWriterSpinlocks.sect">5.5.4. 讀者/寫(xiě)者自旋鎖</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch05s06.html">5.6. 鎖陷阱</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch05s06.html#AmbiguousRules.sect">5.6.1. 模糊的規(guī)則</a></span></dt>
<dt><span class="sect2"><a href="ch05s06.html#LockOrderingRules.sect">5.6.2. 加鎖順序規(guī)則</a></span></dt>
<dt><span class="sect2"><a href="ch05s06.html#FineVersusCoarseGrainedLocking.sect">5.6.3. 細(xì) -粗- 粒度加鎖</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch05s07.html">5.7. 加鎖的各種選擇</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch05s07.html#LockFreeAlgorithms.sect">5.7.1. 不加鎖算法</a></span></dt>
<dt><span class="sect2"><a href="ch05s07.html#AtomicVariables.sect">5.7.2. 原子變量</a></span></dt>
<dt><span class="sect2"><a href="ch05s07.html#BitOperations.sect">5.7.3. 位操作</a></span></dt>
<dt><span class="sect2"><a href="ch05s07.html#seqlocks.sect">5.7.4. seqlock 鎖</a></span></dt>
<dt><span class="sect2"><a href="ch05s07.html#ReadCopyUpdate.sect">5.7.5. 讀取-拷貝-更新</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch05s08.html">5.8. 快速參考</a></span></dt>
</dl></dd>
<dt><span class="chapter"><a href="ch06.html">6. 高級(jí)字符驅(qū)動(dòng)操作</a></span></dt>
<dd><dl>
<dt><span class="sect1"><a href="ch06.html#ioctl.sect1">6.1. ioctl 接口</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch06.html#ChoosingtheioctlCommands.sect2">6.1.1. 選擇 ioctl 命令</a></span></dt>
<dt><span class="sect2"><a href="ch06.html#TheReturnValue.sect2">6.1.2. 返回值</a></span></dt>
<dt><span class="sect2"><a href="ch06.html#ThePredefinedCommands.sect2">6.1.3. 預(yù)定義的命令</a></span></dt>
<dt><span class="sect2"><a href="ch06.html#UsingtheioctlArgument.sect2">6.1.4. 使用 ioctl 參數(shù)</a></span></dt>
<dt><span class="sect2"><a href="ch06.html#CapabilitiesandRestrictedOperations.sect2">6.1.5. 兼容性和受限操作</a></span></dt>
<dt><span class="sect2"><a href="ch06.html#TheImplementationoftheioctl.sect2">6.1.6. ioctl 命令的實(shí)現(xiàn)</a></span></dt>
<dt><span class="sect2"><a href="ch06.html#DeviceControlWithoutioctl.sect2">6.1.7. 不用 ioctl 的設(shè)備控制</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch06s02.html">6.2. 阻塞 I/O</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch06s02.html#IntroductiontoSleeping.sect2">6.2.1. 睡眠的介紹</a></span></dt>
<dt><span class="sect2"><a href="ch06s02.html#SimpleSleeping.sect2">6.2.2. 簡(jiǎn)單睡眠</a></span></dt>
<dt><span class="sect2"><a href="ch06s02.html#BlockingandNonblockingOperations.sect2">6.2.3. 阻塞和非阻塞操作 </a></span></dt>
<dt><span class="sect2"><a href="ch06s02.html#ABlockingIOExample.sect2">6.2.4. 一個(gè)阻塞 I/O 的例子</a></span></dt>
<dt><span class="sect2"><a href="ch06s02.html#AdvancedSleeping.sect2">6.2.5. 高級(jí)睡眠</a></span></dt>
<dt><span class="sect2"><a href="ch06s02.html#TestingtheScullpipeDriver.sect2">6.2.6. 測(cè)試 scullpipe 驅(qū)動(dòng)</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch06s03.html">6.3. poll 和 select</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch06s03.html#Interactionwithreadandwrite.sect2">6.3.1. 與 read 和 write 的交互</a></span></dt>
<dt><span class="sect2"><a href="ch06s03.html#TheUnderlyingDataStructure.sect2">6.3.2. 底層的數(shù)據(jù)結(jié)構(gòu)</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch06s04.html">6.4. 異步通知</a></span></dt>
<dd><dl><dt><span class="sect2"><a href="ch06s04.html#TheDriversPointofView.sect2">6.4.1. 驅(qū)動(dòng)的觀(guān)點(diǎn)</a></span></dt></dl></dd>
<dt><span class="sect1"><a href="ch06s05.html">6.5. 移位一個(gè)設(shè)備</a></span></dt>
<dd><dl><dt><span class="sect2"><a href="ch06s05.html#ThellseekImplementation.sect2">6.5.1. llseek 實(shí)現(xiàn)</a></span></dt></dl></dd>
<dt><span class="sect1"><a href="ch06s06.html">6.6. 在一個(gè)設(shè)備文件上的存取控制</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch06s06.html#SingleOpenDevices.sect2">6.6.1. 單 open 設(shè)備</a></span></dt>
<dt><span class="sect2"><a href="ch06s06.html#RestrictingAccesstoaSingleUserataTime.sect2">6.6.2. 一次對(duì)一個(gè)用戶(hù)限制存取</a></span></dt>
<dt><span class="sect2"><a href="ch06s06.html#BlockingopenasanAlternativetoEBUSY.sect2">6.6.3. 阻塞 open 作為對(duì) EBUSY 的替代</a></span></dt>
<dt><span class="sect2"><a href="ch06s06.html#CloningtheDeviceonopen.sect2">6.6.4. 在 open 時(shí)復(fù)制設(shè)備</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch06s07.html">6.7. 快速參考</a></span></dt>
</dl></dd>
<dt><span class="chapter"><a href="ch07.html">7. 時(shí)間, 延時(shí), 和延后工作</a></span></dt>
<dd><dl>
<dt><span class="sect1"><a href="ch07.html#MeasuringTimeLapes.sect">7.1. 測(cè)量時(shí)間流失</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch07.html#UsingthejiffesCounter.sect">7.1.1. 使用 jiffies 計(jì)數(shù)器</a></span></dt>
<dt><span class="sect2"><a href="ch07.html#PorcessorSpecificRegisters.sect">7.1.2. 處理器特定的寄存器</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch07s02.html">7.2. 獲知當(dāng)前時(shí)間</a></span></dt>
<dt><span class="sect1"><a href="ch07s03.html">7.3. 延后執(zhí)行</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch07s03.html#LongDelays.sect">7.3.1. 長(zhǎng)延時(shí)</a></span></dt>
<dt><span class="sect2"><a href="ch07s03.html#ShortDelays.sect">7.3.2. 短延時(shí)</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch07s04.html">7.4. 內(nèi)核定時(shí)器</a></span></dt>
<dd><dl>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -