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

# wake\_up\_bit(9)

wake up a waiter on a bit

## NAME

wake\_up\_bit - wake up a waiter on a bit

## SYNOPSIS

**void wake\_up\_bit(void \*** *word***, int** *bit***);**

## ARGUMENTS

*word*

the word being waited on, a kernel virtual address

*bit*

the bit of the word being waited on

## DESCRIPTION

There is a standard hashed waitqueue table for generic use. This is the part of the hashtable's accessor API that wakes up waiters on a bit. For instance, if one were to have waiters on a bitflag, one would call **wake\_up\_bit** after clearing the bit.

In order for this to function properly, as it uses **waitqueue\_active** internally, some kind of memory barrier must be done prior to calling this. Typically, this will be **smp\_mb\_\_after\_atomic**, but in some cases where bitflags are manipulated non-atomically under a lock, one may need to use a less regular barrier, such fs/inode.c's **smp\_mb**, because **spin\_unlock** does not guarantee a memory barrier.

## COPYRIGHT
