summaryrefslogtreecommitdiffstats
path: root/docs/nspr/reference/pr_atomicadd.rst
blob: 3f2afeece04f8d92362c22b60f57930731c9d8ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
PR_AtomicAdd
============


Syntax
------

.. code::

   #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.