PR_AtomicAdd

  • Revision slug: PR_AtomicAdd
  • Revision title: PR_AtomicAdd
  • Revision id: 443987
  • Created:
  • Creator: kscarfone
  • Is current revision? Yes
  • Comment Editorial review

Revision Content

Syntax

#include <pratom.h> 

PRInt32 PR_AtomicAdd(
  PRInt32 *ptr, 
  PRInt32 val);

Parameter

The function has the following parameters:

ptr
A pointer to the value to increment.
val
A value to be added.

Returns

The returned value is the result of the addition.

Description

Atomically add a 32 bit value.

 

Revision Source

<h3 id="Syntax">Syntax</h3>
<pre class="eval">
#include &lt;pratom.h&gt; 

PRInt32 PR_AtomicAdd(
  PRInt32 *ptr, 
  PRInt32 val);
</pre>
<h3 id="Parameter">Parameter</h3>
<p>The function has the following parameters:</p>
<dl>
  <dt>
    <code>ptr</code></dt>
  <dd>
    A pointer to the value to increment.</dd>
  <dt>
    <code>val</code></dt>
  <dd>
    A value to be added.</dd>
</dl>
<h3 id="Returns">Returns</h3>
<p>The returned value is the result of the addition.</p>
<h3 id="Description">Description</h3>
<p>Atomically add a 32 bit value.</p>
<dl>
  <dt>
    &nbsp;</dt>
</dl>
Revert to this revision