---
name: "wait_on_bit"
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_bit"
---

# wait\_on\_bit(9)

wait for a bit to be cleared

## NAME

wait\_on\_bit - wait for a bit to be cleared

## SYNOPSIS

**int wait\_on\_bit(void \*** *word***, int** *bit***, int (\****action***) (void \*), unsigned** *mode***);**

## ARGUMENTS

*word*

the word being waited on, a kernel virtual address

*bit*

the bit of the word being waited on

*action*

the function used to sleep, which may take special actions

*mode*

the task state to sleep in

## DESCRIPTION

There is a standard hashed waitqueue table for generic use. This is the part of the hashtable's accessor API that waits on a bit. For instance, if one were to have waiters on a bitflag, one would call **wait\_on\_bit** in threads waiting for the bit to clear. One uses **wait\_on\_bit** where one is waiting for the bit to clear, but has no intention of setting it.

## COPYRIGHT
