Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > cf93d8a8acdcc6fe2225039da0502495 > files > 2236

kernel-doc-2.6.32-131.17.1.el6.centos.plus.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Unreliable Guide To Locking</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Unreliable Guide To Locking" /><link rel="next" href="ch01.html" title="Chapter&#160;1.&#160;Introduction" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Unreliable Guide To Locking</th></tr><tr><td width="20%" align="left">&#160;</td><th width="60%" align="center">&#160;</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch01.html">Next</a></td></tr></table><hr /></div><div class="book" title="Unreliable Guide To Locking"><div class="titlepage"><div><div><h1 class="title"><a id="LKLockingGuide"></a>Unreliable Guide To Locking</h1></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Rusty</span> <span class="surname">Russell</span></h3><div class="affiliation"><div class="address"><p><br />
&#160;&#160;&#160;&#160;&#160;&#160;<code class="email">&lt;<a class="email" href="mailto:rusty@rustcorp.com.au">rusty@rustcorp.com.au</a>&gt;</code><br />
&#160;&#160;&#160;&#160;&#160;</p></div></div></div></div></div><div><p class="copyright">Copyright &#169; 2003 Rusty Russell</p></div><div><div class="legalnotice" title="Legal Notice"><a id="id2872823"></a><p>
     This documentation is free software; you can redistribute
     it and/or modify it under the terms of the GNU General Public
     License as published by the Free Software Foundation; either
     version 2 of the License, or (at your option) any later
     version.
   </p><p>
     This program is distributed in the hope that it will be
     useful, but WITHOUT ANY WARRANTY; without even the implied
     warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     See the GNU General Public License for more details.
   </p><p>
     You should have received a copy of the GNU General Public
     License along with this program; if not, write to the Free
     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
     MA 02111-1307 USA
   </p><p>
     For more details see the file COPYING in the source
     distribution of Linux.
   </p></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="ch01.html">1. Introduction</a></span></dt><dt><span class="chapter"><a href="ch02.html">2. The Problem With Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch02.html#race-condition">Race Conditions and Critical Regions</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch03.html">3. Locking in the Linux Kernel</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch03.html#lock-intro">Two Main Types of Kernel Locks: Spinlocks and Mutexes</a></span></dt><dt><span class="sect1"><a href="ch03s02.html">Locks and Uniprocessor Kernels</a></span></dt><dt><span class="sect1"><a href="ch03s03.html">Locking Only In User Context</a></span></dt><dt><span class="sect1"><a href="ch03s04.html">Locking Between User Context and Softirqs</a></span></dt><dt><span class="sect1"><a href="ch03s05.html">Locking Between User Context and Tasklets</a></span></dt><dt><span class="sect1"><a href="ch03s06.html">Locking Between User Context and Timers</a></span></dt><dt><span class="sect1"><a href="ch03s07.html">Locking Between Tasklets/Timers</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s07.html#lock-tasklets-same">The Same Tasklet/Timer</a></span></dt><dt><span class="sect2"><a href="ch03s07.html#lock-tasklets-different">Different Tasklets/Timers</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s08.html">Locking Between Softirqs</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s08.html#lock-softirqs-same">The Same Softirq</a></span></dt><dt><span class="sect2"><a href="ch03s08.html#lock-softirqs-different">Different Softirqs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="ch04.html">4. Hard IRQ Context</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch04.html#hardirq-softirq">Locking Between Hard IRQ and Softirqs/Tasklets</a></span></dt><dt><span class="sect1"><a href="ch04s02.html">Locking Between Two Hard IRQ Handlers</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch05.html">5. Cheat Sheet For Locking</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch05.html#minimum-lock-reqirements">Table of Minimum Requirements</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch06.html">6. The trylock Functions</a></span></dt><dt><span class="chapter"><a href="ch07.html">7. Common Examples</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch07.html#examples-usercontext">All In User Context</a></span></dt><dt><span class="sect1"><a href="ch07s02.html">Accessing From Interrupt Context</a></span></dt><dt><span class="sect1"><a href="ch07s03.html">Exposing Objects Outside This File</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch07s03.html#examples-refcnt-atomic">Using Atomic Operations For The Reference Count</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch07s04.html">Protecting The Objects Themselves</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch08.html">8. Common Problems</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch08.html#deadlock">Deadlock: Simple and Advanced</a></span></dt><dt><span class="sect1"><a href="ch08s02.html">Preventing Deadlock</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch08s02.html#techs-deadlock-overprevent">Overzealous Prevention Of Deadlocks</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch08s03.html">Racing Timers: A Kernel Pastime</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch09.html">9. Locking Speed</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch09.html#efficiency-rwlocks">Read/Write Lock Variants</a></span></dt><dt><span class="sect1"><a href="ch09s02.html">Avoiding Locks: Read Copy Update</a></span></dt><dt><span class="sect1"><a href="ch09s03.html">Per-CPU Data</a></span></dt><dt><span class="sect1"><a href="ch09s04.html">Data Which Mostly Used By An IRQ Handler</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch10.html">10. What Functions Are Safe To Call From Interrupts?</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch10.html#sleeping">Some Functions Which Sleep</a></span></dt><dt><span class="sect1"><a href="ch10s02.html">Some Functions Which Don't Sleep</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch11.html">11. Further reading</a></span></dt><dt><span class="chapter"><a href="ch12.html">12. Thanks</a></span></dt><dt><span class="glossary"><a href="go01.html">Glossary</a></span></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>2.1. <a href="ch02.html#id2872877">Expected Results</a></dt><dt>2.2. <a href="ch02.html#id2833766">Possible Results</a></dt><dt>5.1. <a href="ch05.html#id2882256">Table of Locking Requirements</a></dt><dt>5.2. <a href="ch05.html#id2882549">Legend for Locking Requirements Table</a></dt><dt>8.1. <a href="ch08.html#id2883400">Consequences</a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right">&#160;<a accesskey="n" href="ch01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right" valign="top">&#160;Chapter&#160;1.&#160;Introduction</td></tr></table></div></body></html>