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