1*5a342f14SRichard Lowe.\"
2*5a342f14SRichard Lowe.\" This file and its contents are supplied under the terms of the
3*5a342f14SRichard Lowe.\" Common Development and Distribution License ("CDDL"), version 1.0.
4*5a342f14SRichard Lowe.\" You may only use this file in accordance with the terms of version
5*5a342f14SRichard Lowe.\" 1.0 of the CDDL.
6*5a342f14SRichard Lowe.\"
7*5a342f14SRichard Lowe.\" A full copy of the text of the CDDL should have accompanied this
8*5a342f14SRichard Lowe.\" source.  A copy of the CDDL is also available via the Internet at
9*5a342f14SRichard Lowe.\" http://www.illumos.org/license/CDDL.
10*5a342f14SRichard Lowe.\"
11*5a342f14SRichard Lowe.\"
12*5a342f14SRichard Lowe.\" Copyright 2017, Richard Lowe.
13*5a342f14SRichard Lowe.\"
14*5a342f14SRichard Lowe.Dd Jan 18, 2017
15*5a342f14SRichard Lowe.Dt VMEM_CONTAINS 9F
16*5a342f14SRichard Lowe.Os
17*5a342f14SRichard Lowe.Sh NAME
18*5a342f14SRichard Lowe.Nm vmem_contains
19*5a342f14SRichard Lowe.Nd check for membership in a vmem arena
20*5a342f14SRichard Lowe.Sh SYNOPSIS
21*5a342f14SRichard Lowe.In sys/vmem.h
22*5a342f14SRichard Lowe.Ft int
23*5a342f14SRichard Lowe.Fo vmem_contains
24*5a342f14SRichard Lowe.Fa "vmem_t *vmp"
25*5a342f14SRichard Lowe.Fa "void *vaddr"
26*5a342f14SRichard Lowe.Fa "size_t *size"
27*5a342f14SRichard Lowe.Fc
28*5a342f14SRichard Lowe.Sh INTERFACE LEVEL
29*5a342f14SRichard Loweillumos DDI specific
30*5a342f14SRichard Lowe.Sh PARAMETERS
31*5a342f14SRichard Lowe.Bl -tag -width Ds
32*5a342f14SRichard Lowe.It Fa vmp
33*5a342f14SRichard LoweThe vmem arena
34*5a342f14SRichard Lowe.It Fa vaddr
35*5a342f14SRichard Loweaddress of the segment to query.
36*5a342f14SRichard Lowe.It Fa size
37*5a342f14SRichard Lowesize of the segment to query
38*5a342f14SRichard Lowe.El
39*5a342f14SRichard Lowe.Sh DESCRIPTION
40*5a342f14SRichard LoweThe
41*5a342f14SRichard Lowe.Fn vmem_contains
42*5a342f14SRichard Lowefunction checks whether a segment of
43*5a342f14SRichard Lowe.Fa size
44*5a342f14SRichard Lowebytes at
45*5a342f14SRichard Lowe.Fa vaddr
46*5a342f14SRichard Loweexists within the vmem arena
47*5a342f14SRichard Lowe.Fa vmp .
48*5a342f14SRichard Lowe.Sh CONTEXT
49*5a342f14SRichard LoweThis function may be called from user or kernel context.
50*5a342f14SRichard Lowe.Sh RETURN VALUES
51*5a342f14SRichard Lowe.Fn vmem_contains
52*5a342f14SRichard Lowereturns non\-0 if the segment exists, and 0 otherwise.
53*5a342f14SRichard Lowe.Sh SEE ALSO
54*5a342f14SRichard Lowe.Xr vmem 9 ,
55*5a342f14SRichard Lowe.Xr vmem_add 9F ,
56*5a342f14SRichard Lowe.Xr vmem_alloc 9F ,
57*5a342f14SRichard Lowe.Xr vmem_create 9F
58