Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 2171

kernel-doc-2.6.32-71.14.1.el6.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>Chapter&#160;7.&#160;Wait Queues include/linux/wait.h</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Unreliable Guide To Hacking The Linux Kernel" /><link rel="up" href="index.html" title="Unreliable Guide To Hacking The Linux Kernel" /><link rel="prev" href="ch06s13.html" title="try_module_get()/module_put() include/linux/module.h" /><link rel="next" href="ch07s02.html" title="Queuing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&#160;7.&#160;Wait Queues
   <code class="filename">include/linux/wait.h</code>
  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch06s13.html">Prev</a>&#160;</td><th width="60%" align="center">&#160;</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch07s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter&#160;7.&#160;Wait Queues include/linux/wait.h"><div class="titlepage"><div><div><h2 class="title"><a id="queues"></a>Chapter&#160;7.&#160;Wait Queues
   <code class="filename">include/linux/wait.h</code>
  </h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ch07.html#queue-declaring">Declaring</a></span></dt><dt><span class="sect1"><a href="ch07s02.html">Queuing</a></span></dt><dt><span class="sect1"><a href="ch07s03.html">Waking Up Queued Tasks</a></span></dt></dl></div><p>
   <span class="emphasis"><em>[SLEEPS]</em></span>
  </p><p>
   A wait queue is used to wait for someone to wake you up when a
   certain condition is true.  They must be used carefully to ensure
   there is no race condition.  You declare a
   <span class="type">wait_queue_head_t</span>, and then processes which want to
   wait for that condition declare a <span class="type">wait_queue_t</span>
   referring to themselves, and place that in the queue.
  </p><div class="sect1" title="Declaring"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="queue-declaring"></a>Declaring</h2></div></div></div><p>
    You declare a <span class="type">wait_queue_head_t</span> using the
    <code class="function">DECLARE_WAIT_QUEUE_HEAD()</code> macro, or using the
    <code class="function">init_waitqueue_head()</code> routine in your
    initialization code.
   </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch06s13.html">Prev</a>&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right">&#160;<a accesskey="n" href="ch07s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> <code class="function">try_module_get()</code>/<code class="function">module_put()</code>
    <code class="filename">include/linux/module.h</code>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Queuing</td></tr></table></div></body></html>