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