ATM_decu
2-8
C Interface
Syntax
uval = ATM_decu(udst);
Parameters
volatile Uns
*udst;
/* pointer to unsigned */
Return Value
Uns
uval;
/* new value after decrement */
Description
ATM_decu atomically decrements a Uns memory location and returns its
new value as follows:
`interrupt disable`
uval = *udst - 1;
*udst = uval;
`interrupt enable`
return (uval);
ATM_decu is written in assembly language, efficiently disabling
interrupts on the target processor during the call.
Decrementing a value equal to the minimum unsigned integer results in
a value equal to the maximum unsigned integer.
See Also
ATM_decu
Atomically decrement Uns memory and return new value