1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>eventfd_signal</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.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="fs_events.html" title="Chapter&#160;3.&#160;Events based on file descriptors"><link rel="next" href="API-eventfd-ctx-get.html" title="eventfd_ctx_get"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">eventfd_signal</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="fs_events.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-ctx-get.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-eventfd-signal"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>eventfd_signal &#8212; 
2  Adds <em class="parameter"><code>n</code></em> to the eventfd counter.
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">__u64 <b class="fsfunc">eventfd_signal </b>(</code></td><td>struct eventfd_ctx * <var class="pdparam">ctx</var>, </td></tr><tr><td>&#160;</td><td>__u64 <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1103111540"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>ctx</code></em></span></dt><dd><p>
4     [in] Pointer to the eventfd context.
5    </p></dd><dt><span class="term"><em class="parameter"><code>n</code></em></span></dt><dd><p>
6     [in] Value of the counter to be added to the eventfd internal counter.
7     The value cannot be negative.
8    </p></dd></dl></div></div><div class="refsect1"><a name="idp1103114252"></a><h2>Description</h2><p>
9   This function is supposed to be called by the kernel in paths that do not
10   allow sleeping. In this function we allow the counter to reach the ULLONG_MAX
11   value, and we signal this as overflow condition by returining a POLLERR
12   to poll(2).
13   </p><p>
14
15   Returns the amount by which the counter was incrememnted.  This will be less
16   than <em class="parameter"><code>n</code></em> if the counter has overflowed.
17</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="fs_events.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-ctx-get.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&#160;3.&#160;Events based on file descriptors&#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 class="phrase">eventfd_ctx_get</span></td></tr></table></div></body></html>
18