Format
#include <builtin.h>int __dec4(int *pNum)
Language Level: None
__dec4 decrements a signed integer in memory at address pNum.
This operation is only atomic on uni-processor machines.
Return Value
The return value indicates whether the decremented value
is negative, zero, or positive by returning -1, 0, or 1
respectively.
Example
This example decrements the value of mem.
#include <stdio.h> #include <builtin.h>
int mem = 1;
int main(void)
{
if (!__dec4(&mem))
{
printf("The memory location is now zero.");
}
/******************************************
The output should be:
The memory location is now zero. ******************************************/
return 0; }
![]()
__inc4 --
Increment 4 Byte Signed Integer
__smp_dec4 --
Decrement 4 Byte Signed Integer Atomically
__smp_inc4 --
Increment 4 Byte Signed Integer Atomically