Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man9/casuword.9
.\" Copyright (c) 2014 The FreeBSD Foundation | .\" Copyright (c) 2014, 2019 The FreeBSD Foundation | ||||
.\" All rights reserved. | .\" All rights reserved. | ||||
.\" | .\" | ||||
.\" Part of this documentation was written by | .\" Part of this documentation was written by | ||||
.\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship | .\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship | ||||
.\" from the FreeBSD Foundation. | .\" from the FreeBSD Foundation. | ||||
.\" | .\" | ||||
.\" Redistribution and use in source and binary forms, with or without | .\" Redistribution and use in source and binary forms, with or without | ||||
.\" modification, are permitted provided that the following conditions | .\" modification, are permitted provided that the following conditions | ||||
Show All 13 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd October 21, 2014 | .Dd April 19, 2019 | ||||
.Dt CASU 9 | .Dt CASU 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm casueword , | .Nm casueword , | ||||
.Nm casueword32 , | .Nm casueword32 , | ||||
.Nm casuword , | .Nm casuword , | ||||
.Nm casuword32 | .Nm casuword32 | ||||
.Nd fetch, compare and store data from user-space | .Nd fetch, compare and store data from user-space | ||||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
.Fn casuword | .Fn casuword | ||||
and | and | ||||
.Fn casuword32 | .Fn casuword32 | ||||
functions return the data fetched or -1 on failure. | functions return the data fetched or -1 on failure. | ||||
The | The | ||||
.Fn casueword | .Fn casueword | ||||
and | and | ||||
.Fn casueword32 | .Fn casueword32 | ||||
functions return 0 on success and -1 on failure. | functions return 0 on success, -1 on failure to access memory, | ||||
and 1 when comparison or store failed. | |||||
The store can fail on load-linked/store-conditional architectures. | |||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr atomic 9 , | .Xr atomic 9 , | ||||
.Xr fetch 9 , | .Xr fetch 9 , | ||||
.Xr store 9 | .Xr store 9 |