xref: /dflybsd-src/share/man/man9/vslock.9 (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
1*86d7f5d3SJohn Marino.\"	$NetBSD: vslock.9,v 1.1 1996/06/15 20:47:29 pk Exp $
2*86d7f5d3SJohn Marino.\"
3*86d7f5d3SJohn Marino.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
4*86d7f5d3SJohn Marino.\" All rights reserved.
5*86d7f5d3SJohn Marino.\"
6*86d7f5d3SJohn Marino.\" This code is derived from software contributed to The NetBSD Foundation
7*86d7f5d3SJohn Marino.\" by Paul Kranenburg.
8*86d7f5d3SJohn Marino.\"
9*86d7f5d3SJohn Marino.\" Redistribution and use in source and binary forms, with or without
10*86d7f5d3SJohn Marino.\" modification, are permitted provided that the following conditions
11*86d7f5d3SJohn Marino.\" are met:
12*86d7f5d3SJohn Marino.\" 1. Redistributions of source code must retain the above copyright
13*86d7f5d3SJohn Marino.\"    notice, this list of conditions and the following disclaimer.
14*86d7f5d3SJohn Marino.\" 2. Redistributions in binary form must reproduce the above copyright
15*86d7f5d3SJohn Marino.\"    notice, this list of conditions and the following disclaimer in the
16*86d7f5d3SJohn Marino.\"    documentation and/or other materials provided with the distribution.
17*86d7f5d3SJohn Marino.\" 3. All advertising materials mentioning features or use of this software
18*86d7f5d3SJohn Marino.\"    must display the following acknowledgement:
19*86d7f5d3SJohn Marino.\"        This product includes software developed by the NetBSD
20*86d7f5d3SJohn Marino.\"        Foundation, Inc. and its contributors.
21*86d7f5d3SJohn Marino.\" 4. Neither the name of The NetBSD Foundation nor the names of its
22*86d7f5d3SJohn Marino.\"    contributors may be used to endorse or promote products derived
23*86d7f5d3SJohn Marino.\"    from this software without specific prior written permission.
24*86d7f5d3SJohn Marino.\"
25*86d7f5d3SJohn Marino.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26*86d7f5d3SJohn Marino.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27*86d7f5d3SJohn Marino.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28*86d7f5d3SJohn Marino.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
29*86d7f5d3SJohn Marino.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30*86d7f5d3SJohn Marino.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31*86d7f5d3SJohn Marino.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32*86d7f5d3SJohn Marino.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33*86d7f5d3SJohn Marino.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34*86d7f5d3SJohn Marino.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35*86d7f5d3SJohn Marino.\" POSSIBILITY OF SUCH DAMAGE.
36*86d7f5d3SJohn Marino.\"
37*86d7f5d3SJohn Marino.\" $FreeBSD: src/share/man/man9/vslock.9,v 1.4.2.3 2001/12/17 11:30:19 ru Exp $
38*86d7f5d3SJohn Marino.\" $DragonFly: src/share/man/man9/vslock.9,v 1.3 2006/03/26 22:56:57 swildner Exp $
39*86d7f5d3SJohn Marino.\"
40*86d7f5d3SJohn Marino.Dd June 15, 1996
41*86d7f5d3SJohn Marino.Dt VSLOCK 9
42*86d7f5d3SJohn Marino.Os
43*86d7f5d3SJohn Marino.Sh NAME
44*86d7f5d3SJohn Marino.Nm vslock ,
45*86d7f5d3SJohn Marino.Nm vsunlock
46*86d7f5d3SJohn Marino.Nd lock/unlock user space addresses in memory
47*86d7f5d3SJohn Marino.Sh SYNOPSIS
48*86d7f5d3SJohn Marino.In sys/types.h
49*86d7f5d3SJohn Marino.In vm/vm.h
50*86d7f5d3SJohn Marino.In vm/vm_extern.h
51*86d7f5d3SJohn Marino.Ft void
52*86d7f5d3SJohn Marino.Fn vslock "caddr_t addr" "u_int len"
53*86d7f5d3SJohn Marino.Ft void
54*86d7f5d3SJohn Marino.Fn vsunlock "caddr_t addr" "u_int len"
55*86d7f5d3SJohn Marino.Sh DESCRIPTION
56*86d7f5d3SJohn MarinoThe
57*86d7f5d3SJohn Marino.Fn vslock
58*86d7f5d3SJohn Marinoand
59*86d7f5d3SJohn Marino.Fn vsunlock
60*86d7f5d3SJohn Marinofunctions respectively lock and unlock a range of
61*86d7f5d3SJohn Marinoaddresses belonging to the currently running process into memory.
62*86d7f5d3SJohn MarinoThe actual amount of memory locked is a multiple of the machine's page size.
63*86d7f5d3SJohn MarinoThe starting page number is computed by truncating
64*86d7f5d3SJohn Marino.Fa addr
65*86d7f5d3SJohn Marinoto the nearest preceding page boundary, and by rounding up
66*86d7f5d3SJohn Marino.Fa addr +
67*86d7f5d3SJohn Marino.Fa len
68*86d7f5d3SJohn Marinoto the next page boundary.
69*86d7f5d3SJohn MarinoThe process context to use for this operation is taken from the
70*86d7f5d3SJohn Marinoglobal variable
71*86d7f5d3SJohn Marino.Va curproc .
72*86d7f5d3SJohn Marino.\" .Sh SEE ALSO
73*86d7f5d3SJohn Marino.\" .Xr physio 9
74*86d7f5d3SJohn Marino.Sh BUGS
75*86d7f5d3SJohn MarinoThe process pointer should be passed in as an argument.
76