mozilla

Revision 195198 of PR_AtomicIncrement

  • Revision slug: PR_AtomicIncrement
  • Revision title: PR_AtomicIncrement
  • Revision id: 195198
  • Created:
  • Creator: Rappo
  • Is current revision? No
  • Comment

Revision Content

{{template.Nsprapiref("Atomic Operations")}}

Atomically increments a 32-bit value.

Syntax

#include <pratom.h> 
PRInt32 PR_AtomicIncrement(PRInt32 *val);

Parameter

The function has the following parameter:

val
A pointer to the value to increment.

Returns

The function returns the incremented value (i.e., the result).

Description

The referenced variable is incremented by one. The result of the function is the value of the memory after the operation. The writing of the memory is unconditional.

Revision Source

<p>
{{template.Nsprapiref("Atomic Operations")}}
</p><p>Atomically increments a 32-bit value.
</p>
<h3 name="Syntax"> Syntax </h3>
<pre class="eval">#include &lt;pratom.h&gt; 
</pre>
<pre class="eval"><a href="en/PRInt32">PRInt32</a> PR_AtomicIncrement(PRInt32 *val);
</pre>
<h3 name="Parameter"> Parameter </h3>
<p>The function has the following parameter:
</p>
<dl><dt><code>val</code>
</dt><dt>A pointer to the value to increment.
</dt></dl>
<h3 name="Returns"> Returns </h3>
<p>The function returns the incremented value (i.e., the result).
</p>
<h3 name="Description"> Description </h3>
<p>The referenced variable is incremented by one. The result of the function is the value of the memory after the operation. The writing of the memory is unconditional.
</p>
Revert to this revision