diff options
| author | Staysail Systems, Inc <info@staysail.tech> | 2024-02-22 01:03:04 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-02-22 01:04:43 -0800 |
| commit | d7a4a138ba371e8a969a7fde8219c88870d288fc (patch) | |
| tree | 99a2f036788e66570b38d2b20923945bc941946a /man/v1.7.2/nng_cv_alloc.3supp.html | |
| parent | e96b0be664b5c67cc13898864d46fdb5956de1b1 (diff) | |
| download | nng-d7a4a138ba371e8a969a7fde8219c88870d288fc.tar.gz nng-d7a4a138ba371e8a969a7fde8219c88870d288fc.tar.bz2 nng-d7a4a138ba371e8a969a7fde8219c88870d288fc.zip | |
Manual page updates for v1.7.2
Diffstat (limited to 'man/v1.7.2/nng_cv_alloc.3supp.html')
| -rw-r--r-- | man/v1.7.2/nng_cv_alloc.3supp.html | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/man/v1.7.2/nng_cv_alloc.3supp.html b/man/v1.7.2/nng_cv_alloc.3supp.html new file mode 100644 index 00000000..6663d78e --- /dev/null +++ b/man/v1.7.2/nng_cv_alloc.3supp.html @@ -0,0 +1,87 @@ +--- +version: v1.7.2 +layout: manpage_v2 +title: nng_cv_alloc(3supp) +--- +<h1>nng_cv_alloc(3supp)</h1> +<div class="sect1"> +<h2 id="_name">NAME</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>nng_cv_alloc - allocate condition variable</p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_synopsis">SYNOPSIS</h2> +<div class="sectionbody"> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="c"><span></span><span class="tok-cp">#include</span><span class="tok-w"> </span><span class="tok-cpf"><nng/nng.h></span> +<span class="tok-cp">#include</span><span class="tok-w"> </span><span class="tok-cpf"><nng/supplemental/util/platform.h></span> + +<span class="tok-k">typedef</span><span class="tok-w"> </span><span class="tok-k">struct</span><span class="tok-w"> </span><span class="tok-nc">nng_cv</span><span class="tok-w"> </span><span class="tok-n">nng_cv</span><span class="tok-p">;</span> + +<span class="tok-kt">int</span><span class="tok-w"> </span><span class="tok-nf">nng_cv_alloc</span><span class="tok-p">(</span><span class="tok-n">nng_cv</span><span class="tok-w"> </span><span class="tok-o">**</span><span class="tok-n">cvp</span><span class="tok-p">,</span><span class="tok-w"> </span><span class="tok-n">nng_mtx</span><span class="tok-w"> </span><span class="tok-o">*</span><span class="tok-n">mtx</span><span class="tok-p">);</span></code></pre> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_description">DESCRIPTION</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>The <code>nng_cv_alloc()</code> function allocates a condition variable, using +the mutex <em>mtx</em>, and returns it in <em>cvp</em>.</p> +</div> +<div class="paragraph"> +<p>Every condition variable is associated with a mutex, which must be +owned when a thread waits for the condition using +<a href="nng_cv_wait.3supp.html"><code>nng_cv_wait()</code></a> or +<a href="nng_cv_until.3supp.html"><code>nng_cv_until()</code></a>. +The mutex must also be owned when signaling the condition using the +<a href="nng_cv_wake.3supp.html"><code>nng_cv_wake()</code></a> or +<a href="nng_cv_wake1.3supp.html"><code>nng_cv_wake1()</code></a> functions.</p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_return_values">RETURN VALUES</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>This function returns 0 on success, and non-zero otherwise.</p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_errors">ERRORS</h2> +<div class="sectionbody"> +<div class="hdlist"> +<table> +<tr> +<td class="hdlist1"> +<code>NNG_ENOMEM</code> +</td> +<td class="hdlist2"> +<p>Insufficient free memory exists.</p> +</td> +</tr> +</table> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_see_also">SEE ALSO</h2> +<div class="sectionbody"> +<div class="paragraph text-left"> +<p><a href="nng_cv_free.3supp.html">nng_cv_free(3supp)</a>, +<a href="nng_cv_until.3supp.html">nng_cv_until(3supp)</a>, +<a href="nng_cv_wait.3supp.html">nng_cv_wait(3supp)</a>, +<a href="nng_cv_wake.3supp.html">nng_cv_wake(3supp)</a>, +<a href="nng_cv_wake1.3supp.html">nng_cv_wake1(3supp)</a>, +<a href="nng_mtx_alloc.3supp.html">nng_mtx_alloc(3supp)</a>, +<a href="nng_strerror.3.html">nng_strerror(3)</a>, +<a href="nng.7.html">nng(7)</a></p> +</div> +</div> +</div> |
