Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > fa21ac0b5c825597d4ae80018c3f2f25 > files > 1536

kernel-doc-2.6.38.6-26.rc1.fc15.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>eventfd_ctx_read</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="Linux Filesystems API" /><link rel="up" href="fs_events.html" title="Chapter&#160;3.&#160;Events based on file descriptors" /><link rel="prev" href="API-eventfd-ctx-remove-wait-queue.html" title="eventfd_ctx_remove_wait_queue" /><link rel="next" href="API-eventfd-fget.html" title="eventfd_fget" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>eventfd_ctx_read</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-eventfd-ctx-remove-wait-queue.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;3.&#160;Events based on file descriptors</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-eventfd-fget.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="eventfd_ctx_read"><a id="API-eventfd-ctx-read"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>eventfd_ctx_read &#8212; 
     Reads the eventfd counter or wait if it is zero.
 </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">ssize_t <strong>fsfunceventfd_ctx_read </strong>(</code></td><td>struct eventfd_ctx * <var class="pdparam">ctx</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">no_wait</var>, </td></tr><tr><td>&#160;</td><td>__u64 * <var class="pdparam">cnt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1" title="Arguments"><a id="id2763899"></a><h2>Arguments</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>ctx</code></em></span></dt><dd><p>
     [in] Pointer to eventfd context.
    </p></dd><dt><span class="term"><em class="parameter"><code>no_wait</code></em></span></dt><dd><p>
     [in] Different from zero if the operation should not block.
    </p></dd><dt><span class="term"><em class="parameter"><code>cnt</code></em></span></dt><dd><p>
     [out] Pointer to the 64-bit counter value.
    </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id2763960"></a><h2>Description</h2><p>
   Returns <code class="constant">0</code> if successful, or the following error codes:
   </p><p>

   -EAGAIN      : The operation would have blocked but <em class="parameter"><code>no_wait</code></em> was non-zero.
   -ERESTARTSYS : A signal interrupted the wait operation.
   </p><p>

   If <em class="parameter"><code>no_wait</code></em> is zero, the function might sleep until the eventfd internal
   counter becomes greater than zero.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-eventfd-ctx-remove-wait-queue.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="fs_events.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-eventfd-fget.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>eventfd_ctx_remove_wait_queue</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span>eventfd_fget</span></td></tr></table></div></body></html>