mozilla

Revision 195202 of PR_AtomicDecrement

  • Revision slug: PR_AtomicDecrement
  • Revision title: PR_AtomicDecrement
  • Revision id: 195202
  • Created:
  • Creator: Rappo
  • Is current revision? Yes
  • Comment /* Parameter */

Revision Content

{{ Nsprapiref("Atomic Operations") }}

Atomically decrements a 32-bit value.

Syntax

#include <pratom.h> 

PRInt32 PR_AtomicDecrement(PRInt32 *val);

Parameter

The function has the following parameter:

val
A pointer to the value to decrement.

Returns

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

Description

PR_AtomicDecrement first decrements the referenced variable by one. The value returned is the referenced variable's final value. The modification to memory is unconditional.

Revision Source

<p>
{{ Nsprapiref("Atomic Operations") }}
</p><p>Atomically decrements a 32-bit value.
</p>
<h3 id="Syntax" name="Syntax"> Syntax </h3>
<pre class="eval">#include &lt;pratom.h&gt; 

<a href="en/PRInt32">PRInt32</a> PR_AtomicDecrement(PRInt32 *val);
</pre>
<h3 id="Parameter" name="Parameter"> Parameter </h3>
<p>The function has the following parameter:
</p>
<dl><dt><code>val</code>
</dt><dd>A pointer to the value to decrement.
</dd></dl>
<h3 id="Returns" name="Returns"> Returns </h3>
<p>The function returns the decremented value (i.e., the result).
</p>
<h3 id="Description" name="Description"> Description </h3>
<p><code>PR_AtomicDecrement</code> first decrements the referenced variable by one. The value returned is the referenced variable's final value. The modification to memory is unconditional.
</p>
Revert to this revision