---
name: "atomic_sub_and_test"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/atomic_sub_and_test"
---

# atomic\_sub\_and\_test(9)

subtract value from variable and test result

## NAME

atomic\_sub\_and\_test - subtract value from variable and test result

## SYNOPSIS

**int atomic\_sub\_and\_test(int** *i***, atomic\_t \*** *v***);**

## ARGUMENTS

*i*

integer value to subtract

*v*

pointer of type atomic\_t

## DESCRIPTION

Atomically subtracts *i* from *v* and returns true if the result is zero, or false for all other cases.

## COPYRIGHT
