1*d8b80295SApple OSS Distributions.\" $NetBSD: fetch.9,v 1.2 1996/01/09 21:59:24 perry Exp $ 2*d8b80295SApple OSS Distributions.\" 3*d8b80295SApple OSS Distributions.\" Copyright (c) 1996 Jason R. Thorpe. 4*d8b80295SApple OSS Distributions.\" All rights reserved. 5*d8b80295SApple OSS Distributions.\" 6*d8b80295SApple OSS Distributions.\" This code is derived from software contributed by Kenneth Stailey. 7*d8b80295SApple OSS Distributions.\" 8*d8b80295SApple OSS Distributions.\" Redistribution and use in source and binary forms, with or without 9*d8b80295SApple OSS Distributions.\" modification, are permitted provided that the following conditions 10*d8b80295SApple OSS Distributions.\" are met: 11*d8b80295SApple OSS Distributions.\" 1. Redistributions of source code must retain the above copyright 12*d8b80295SApple OSS Distributions.\" notice, this list of conditions and the following disclaimer. 13*d8b80295SApple OSS Distributions.\" 2. Redistributions in binary form must reproduce the above copyright 14*d8b80295SApple OSS Distributions.\" notice, this list of conditions and the following disclaimer in the 15*d8b80295SApple OSS Distributions.\" documentation and/or other materials provided with the distribution. 16*d8b80295SApple OSS Distributions.\" 3. All advertising materials mentioning features or use of this software 17*d8b80295SApple OSS Distributions.\" must display the following acknowledgement: 18*d8b80295SApple OSS Distributions.\" This product includes software developed for the NetBSD Project 19*d8b80295SApple OSS Distributions.\" by Jason R. Thorpe. 20*d8b80295SApple OSS Distributions.\" 4. The name of the author may not be used to endorse or promote products 21*d8b80295SApple OSS Distributions.\" derived from this software without specific prior written permission. 22*d8b80295SApple OSS Distributions.\" 23*d8b80295SApple OSS Distributions.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 24*d8b80295SApple OSS Distributions.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25*d8b80295SApple OSS Distributions.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26*d8b80295SApple OSS Distributions.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 27*d8b80295SApple OSS Distributions.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28*d8b80295SApple OSS Distributions.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29*d8b80295SApple OSS Distributions.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 30*d8b80295SApple OSS Distributions.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 31*d8b80295SApple OSS Distributions.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32*d8b80295SApple OSS Distributions.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33*d8b80295SApple OSS Distributions.\" SUCH DAMAGE. 34*d8b80295SApple OSS Distributions.\" 35*d8b80295SApple OSS Distributions.\" $FreeBSD: src/share/man/man9/fetch.9,v 1.6.2.4 2001/12/17 11:30:18 ru Exp $ 36*d8b80295SApple OSS Distributions.\" 37*d8b80295SApple OSS Distributions.Dd December 16, 2004 38*d8b80295SApple OSS Distributions.Dt FETCH 9 39*d8b80295SApple OSS Distributions.Os 40*d8b80295SApple OSS Distributions.Sh NAME 41*d8b80295SApple OSS Distributions.Nm fetch , 42*d8b80295SApple OSS Distributions.Nm fubyte , 43*d8b80295SApple OSS Distributions.Nm fuibyte , 44*d8b80295SApple OSS Distributions.Nm fuiword , 45*d8b80295SApple OSS Distributions.Nm fulong , 46*d8b80295SApple OSS Distributions.Nm fuulong , 47*d8b80295SApple OSS Distributions.Nm fuword 48*d8b80295SApple OSS Distributions.Nd fetch data from user-space 49*d8b80295SApple OSS Distributions.Sh SYNOPSIS 50*d8b80295SApple OSS Distributions.In sys/types.h 51*d8b80295SApple OSS Distributions.In sys/time.h 52*d8b80295SApple OSS Distributions.In sys/systm.h 53*d8b80295SApple OSS Distributions.In sys/resourcevar.h 54*d8b80295SApple OSS Distributions.\" 55*d8b80295SApple OSS Distributions.Ft int 56*d8b80295SApple OSS Distributions.Fo fubyte 57*d8b80295SApple OSS Distributions.Fa "const user_addr_t addr" 58*d8b80295SApple OSS Distributions.Fc 59*d8b80295SApple OSS Distributions.Ft int 60*d8b80295SApple OSS Distributions.Fo fuibyte 61*d8b80295SApple OSS Distributions.Fa "const user_addr_t addr" 62*d8b80295SApple OSS Distributions.Fc 63*d8b80295SApple OSS Distributions.Ft int 64*d8b80295SApple OSS Distributions.Fo fuiword 65*d8b80295SApple OSS Distributions.Fa "user_addr_t addr" 66*d8b80295SApple OSS Distributions.Fc 67*d8b80295SApple OSS Distributions.Ft int64_t 68*d8b80295SApple OSS Distributions.Fo fulong 69*d8b80295SApple OSS Distributions.Fa "user_addr_t addr" 70*d8b80295SApple OSS Distributions.Fc 71*d8b80295SApple OSS Distributions.Ft uint64_t 72*d8b80295SApple OSS Distributions.Fo fuulong 73*d8b80295SApple OSS Distributions.Fa "user_addr_t addr" 74*d8b80295SApple OSS Distributions.Fc 75*d8b80295SApple OSS Distributions.Ft int 76*d8b80295SApple OSS Distributions.Fo fuword 77*d8b80295SApple OSS Distributions.Fa "user_addr_t addr" 78*d8b80295SApple OSS Distributions.Fc 79*d8b80295SApple OSS Distributions.Sh DESCRIPTION 80*d8b80295SApple OSS DistributionsThe 81*d8b80295SApple OSS Distributions.Nm 82*d8b80295SApple OSS Distributionsfunctions are designed to copy small amounts of data from user-space. 83*d8b80295SApple OSS Distributions.Pp 84*d8b80295SApple OSS DistributionsThe 85*d8b80295SApple OSS Distributions.Nm 86*d8b80295SApple OSS Distributionsroutines provide the following functionality: 87*d8b80295SApple OSS Distributions.Bl -tag -width "fuiword()" 88*d8b80295SApple OSS Distributions.\" ========== 89*d8b80295SApple OSS Distributions.It Fn fubyte 90*d8b80295SApple OSS DistributionsFetches a byte of data from the user-space address 91*d8b80295SApple OSS Distributions.Pa addr . 92*d8b80295SApple OSS Distributions.\" ========== 93*d8b80295SApple OSS Distributions.It Fn fuibyte 94*d8b80295SApple OSS DistributionsFetches a byte of data from the user-space address 95*d8b80295SApple OSS Distributions.Pa addr . 96*d8b80295SApple OSS DistributionsThis function is safe to call during an interrupt context. 97*d8b80295SApple OSS Distributions.\" ========== 98*d8b80295SApple OSS Distributions.It Fn fuiword 99*d8b80295SApple OSS DistributionsFetches a word of data from the user-space address 100*d8b80295SApple OSS Distributions.Pa addr . 101*d8b80295SApple OSS DistributionsThis function is safe to call during an interrupt context. 102*d8b80295SApple OSS Distributions.\" ========== 103*d8b80295SApple OSS Distributions.It Fn fulong 104*d8b80295SApple OSS DistributionsFetches a long word of data from the user-space address 105*d8b80295SApple OSS Distributions.Pa addr . 106*d8b80295SApple OSS Distributions.\" ========== 107*d8b80295SApple OSS Distributions.It Fn fuulong 108*d8b80295SApple OSS DistributionsFetches a unsigned long word of data from the user-space address 109*d8b80295SApple OSS Distributions.Pa addr . 110*d8b80295SApple OSS Distributions.\" ========== 111*d8b80295SApple OSS Distributions.It Fn fuword 112*d8b80295SApple OSS DistributionsFetches a word of data from the user-space address 113*d8b80295SApple OSS Distributions.Pa addr . 114*d8b80295SApple OSS Distributions.El 115*d8b80295SApple OSS Distributions.Sh RETURN VALUES 116*d8b80295SApple OSS DistributionsThe 117*d8b80295SApple OSS Distributions.Nm 118*d8b80295SApple OSS Distributionsfunctions return the data fetched or -1 on failure. 119*d8b80295SApple OSS Distributions.Sh SEE ALSO 120*d8b80295SApple OSS Distributions.Xr copy 9 , 121*d8b80295SApple OSS Distributions.Xr store 9 122