atomic_dec_and_mutex_lock(9)

atomic_dec_and_mutex_lock9

Return holding mutex if we dec to 0

Usage

int atomic_dec_and_mutex_lock(atomic_t * cnt, struct mutex * lock);

Arguments

cnt

the atomic which we are to dec

lock

the mutex to return holding if we dec to 0

Overview

return true and hold lock if we dec to 0, return false otherwise

Releases

3 releases since Debian 7 (Wheezy); the text changed 2 times.

  1. 7
  2. 8
  3. 9

Author

Rusty Russell <[email protected]>

Author.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.