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