Manual Page Result
0
Command: atomic_dec_int | Section: 9 | Source: OpenBSD | File: atomic_dec_int.9
ATOMIC_DEC_INT(9) FreeBSD Kernel Developer's Manual ATOMIC_DEC_INT(9)
NAME
atomic_dec_int, atomic_dec_int_nv, atomic_dec_long, atomic_dec_long_nv -
atomic decrement operations
SYNOPSIS
#include <sys/atomic.h>
void
atomic_dec_int(volatile unsigned int *p);
unsigned int
atomic_dec_int_nv(volatile unsigned int *p);
void
atomic_dec_long(volatile unsigned long *p );
unsigned long
atomic_dec_long_nv(volatile unsigned long *p);
DESCRIPTION
The atomic_dec set of functions provide an interface for atomically
performing decrement and decrement-and-fetch operations with respect to
interrupts and multiple processors in the system.
The value referenced by the pointer p is decremented by 1.
CONTEXT
atomic_dec_int(), atomic_dec_int_nv(), atomic_dec_long(), and
atomic_dec_long_nv() can all be called during autoconf, from process
context, or from interrupt context.
RETURN VALUES
atomic_dec_int and atomic_dec_long perform the decrement without
returning any knowledge of the value at p.
atomic_dec_int_nv and atomic_dec_long_nv return the value at p after the
decrement was performed.
SEE ALSO
atomic_add_int(9), atomic_inc_int(9)
HISTORY
The atomic_add functions first appeared in NetBSD 5.0 and OpenBSD 5.5.
FreeBSD 14.1-RELEASE-p8 February 13, 2014 FreeBSD 14.1-RELEASE-p8