'\" te .\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH ATOMIC_INC 3C "February 17, 2023" .SH NAME atomic_inc, atomic_inc_8, atomic_inc_uchar, atomic_inc_16, atomic_inc_ushort, atomic_inc_32, atomic_inc_uint, atomic_inc_ulong, atomic_inc_64, atomic_inc_ptr, atomic_inc_8_nv, atomic_inc_uchar_nv, atomic_inc_16_nv, atomic_inc_ushort_nv, atomic_inc_32_nv, atomic_inc_uint_nv, atomic_inc_ulong_nv, atomic_inc_64_nv, atomic_inc_ptr_nv \- atomic increment operations .SH SYNOPSIS .nf #include \fBvoid\fR \fBatomic_inc_8\fR(\fBvolatile uint8_t *\fR\fItarget\fR); .fi .LP .nf \fBvoid\fR \fBatomic_inc_uchar\fR(\fBvolatile uchar_t *\fR\fItarget\fR); .fi .LP .nf \fBvoid\fR \fBatomic_inc_16\fR(\fBvolatile uint16_t *\fR\fItarget\fR); .fi .LP .nf \fBvoid\fR \fBatomic_inc_ushort\fR(\fBvolatile ushort_t *\fR\fItarget\fR); .fi .LP .nf \fBvoid\fR \fBatomic_inc_32\fR(\fBvolatile uint32_t *\fR\fItarget\fR); .fi .LP .nf \fBvoid\fR \fBatomic_inc_uint\fR(\fBvolatile uint_t *\fR\fItarget\fR); .fi .LP .nf \fBvoid\fR \fBatomic_inc_ulong\fR(\fBvolatile ulong_t *\fR\fItarget\fR); .fi .LP .nf \fBvoid\fR \fBatomic_inc_64\fR(\fBvolatile uint64_t *\fR\fItarget\fR); .fi .LP .nf \fBvoid\fR \fBatomic_inc_ptr\fR(\fBvolatile void *\fR\fItarget\fR); .fi .LP .nf \fBuint8_t\fR \fBatomic_inc_8_nv\fR(\fBvolatile uint8_t *\fR\fItarget\fR); .fi .LP .nf \fBuchar_t\fR \fBatomic_inc_uchar_nv\fR(\fBvolatile uchar_t *\fR\fItarget\fR); .fi .LP .nf \fBuint16_t\fR \fBatomic_inc_16_nv\fR(\fBvolatile uint16_t *\fR\fItarget\fR); .fi .LP .nf \fBushort_t\fR \fBatomic_inc_ushort_nv\fR(\fBvolatile ushort_t *\fR\fItarget\fR); .fi .LP .nf \fBuint32_t\fR \fBatomic_inc_32_nv\fR(\fBvolatile uint32_t *\fR\fItarget\fR); .fi .LP .nf \fBuint_t\fR \fBatomic_inc_uint_nv\fR(\fBvolatile uint_t *\fR\fItarget\fR); .fi .LP .nf \fBulong_t\fR \fBatomic_inc_ulong_nv\fR(\fBvolatile ulong_t *\fR\fItarget\fR); .fi .LP .nf \fBuint64_t\fR \fBatomic_inc_64_nv\fR(\fBvolatile uint64_t *\fR\fItarget\fR); .fi .LP .nf \fBvoid *\fR\fBatomic_inc_ptr_nv\fR(\fBvolatile void *\fR\fItarget\fR); .fi .SH DESCRIPTION These functions enable the incrementing (by one) of the value stored in \fItarget\fR to occur in an atomic manner. .SH RETURN VALUES The *\fB_nv()\fR variants of these functions return the new value of \fItarget\fR. .SH ERRORS No errors are defined. .SH ATTRIBUTES See \fBattributes\fR(7) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Stable _ MT-Level MT-Safe .TE .SH SEE ALSO .BR atomic_add (3C), .BR atomic_and (3C), .BR atomic_bits (3C), .BR atomic_cas (3C), .BR atomic_dec (3C), .BR atomic_or (3C), .BR atomic_swap (3C), .BR membar_ops (3C), .BR attributes (7), .BR atomic_ops (9F) .SH NOTES The *\fB_nv()\fR variants are substantially more expensive on some platforms than the versions that do not return values. Do not use them unless you need to know the new value \fBatomically\fR.