ATOMIC_DEC_INT(9) BSD Kernel Developer's Manual ATOMIC_DEC_INT(9)
atomic_dec_int, atomic_dec_int_nv, atomic_dec_long, atomic_dec_long_nv --
atomic decrement operations
atomic_dec_int(volatile unsigned int *p);
atomic_dec_int_nv(volatile unsigned int *p);
atomic_dec_long(volatile unsigned long *p);
atomic_dec_long_nv(volatile unsigned long *p);
The atomic_dec set of functions provide an interface for atomically per-
forming 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.
atomic_dec_int(), atomic_dec_int_nv(), atomic_dec_long(), and
atomic_dec_long_nv() can all be called during autoconf, from process con-
text, or from interrupt context.
atomic_dec_int and atomic_dec_long perform the decrement without return-
ing 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.
The atomic_add functions first appeared in NetBSD 5.0 and OpenBSD 5.5.
BSD February 13, 2014 BSD