diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2014-02-03 07:03:05 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2014-02-03 07:03:05 +0000 |
commit | c0c9f8c618bd724097fffeebd8ded5d2b215e2f1 (patch) | |
tree | 04395d6fa02231c3251ff3cbe02a777054e6b0f0 /share/man/man9/atomic_cas_uint.9 | |
parent | 8cb2192f01bdcc5092384356db59967ef87dc47b (diff) |
rename the atomic_foo manpages to atomic_foo_int or _uint cos we name these
after functions. for reasons.
reminded by jmc@
Diffstat (limited to 'share/man/man9/atomic_cas_uint.9')
-rw-r--r-- | share/man/man9/atomic_cas_uint.9 | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/share/man/man9/atomic_cas_uint.9 b/share/man/man9/atomic_cas_uint.9 new file mode 100644 index 00000000000..bae5c4149af --- /dev/null +++ b/share/man/man9/atomic_cas_uint.9 @@ -0,0 +1,56 @@ +.\" $OpenBSD: atomic_cas_uint.9,v 1.1 2014/02/03 07:03:04 dlg Exp $ +.\" +.\" Copyright (c) 2014 David Gwynne <dlg@openbsd.org> +.\" All rights reserved. +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: February 3 2014 $ +.Dt ATOMIC_CAS 9 +.Os +.Sh NAME +.Nm atomic_cas_uint , +.Nm atomic_cas_ulong , +.Nm atomic_cas_ptr +.Nd atomic compare-and-swap operations +.Sh SYNOPSIS +.In sys/atomic.h +.Ft unsigned int +.Fn atomic_cas_uint "volatile unsigned int *p" "unsigned int expected" "unsigned int new" +.Ft unsigned long +.Fn atomic_cas_ulong "volatile unsigned long *p" "unsigned long expected" "unsigned long new" +.Ft void * +.Fn atomic_cas_ptr "volatile void **p" "void *expected" "void *new" +.Sh DESCRIPTION +The atomic_cas set of functions provide an interface for atomically +performing compare-and-swap operations with respect to interrupts +and multiple processors in the system. +.Pp +The value referenced by the pointer +.Fa p +is compared against +.Fa expected . +If these values are equal then +.Fa new +replaces the value stored at +.Fa p . +.Sh RETURN VALUES +These functions return the value at +.Fa p +as it was before the attempt to swap it. +.Sh SEE ALSO +.Xr atomic 9 , +.Xr atomic_swap_uint 9 +.Sh HISTORY +The atomic_cas functions first appeared in +.Ox 5.5 . |