---
name: "wait_on_atomic_t"
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/wait_on_atomic_t"
---

# wait\_on\_atomic\_t(9)

Wait for an atomic\_t to become 0

## NAME

wait\_on\_atomic\_t - Wait for an atomic\_t to become 0

## SYNOPSIS

**int wait\_on\_atomic\_t(atomic\_t \*** *val***, int (\****action***) (atomic\_t \*), unsigned** *mode***);**

## ARGUMENTS

*val*

The atomic value being waited on, a kernel virtual address

*action*

the function used to sleep, which may take special actions

*mode*

the task state to sleep in

## DESCRIPTION

Wait for an atomic\_t to become 0. We abuse the bit-wait waitqueue table for the purpose of getting a waitqueue, but we set the key to a bit number outside of the target 'word'.

## COPYRIGHT
