PR_AtomicIncrement
PR_AtomicDecrement
PR_AtomicSet
PR_AtomicIncrement Atomically increments a 32-bit value. Syntax #include <pratom.h> PRInt32 PR_AtomicIncrement(PRInt32 *val); Parameter The function has the following parameter:
#include <pratom.h>
PRInt32 PR_AtomicIncrement(PRInt32 *val);
val
Returns The function returns a value of the field after it was incremented (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. PR_AtomicDecrement Atomically decrements a 32-bit value. Syntax #include <pratom.h> PRInt32 PR_AtomicDecrement(PRInt32 *val); Parameter The function has the following parameter:
PRInt32 PR_AtomicDecrement(PRInt32 *val);
Returns The function returns a value of the memory after the decrement, (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. PR_AtomicSet Atomically sets a 32-bit value and return its previous contents. Syntax #include <pratom.h> PRInt32 PR_AtomicSet( PRInt32 *val, PRInt32 newval); Parameters The function has the following parameters:
PRInt32 PR_AtomicSet( PRInt32 *val, PRInt32 newval);
newval
Returns The function returns the prior value of the referenced variable. Description PR_AtomicSet first reads the value of var, then updates it with the supplied value. The returned value is the value that was read before memory was updated. The memory modification is unconditional--that is, it is not a test and set operation.
Last Updated: Mon Jul 13 18:15:01 PDT 1998