Print this page
code review from Josh and Robert
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man9f/vmem_walk.9f
+++ new/usr/src/man/man9f/vmem_walk.9f
1 1 .\"
2 2 .\" This file and its contents are supplied under the terms of the
3 3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 4 .\" You may only use this file in accordance with the terms of version
5 5 .\" 1.0 of the CDDL.
6 6 .\"
7 7 .\" A full copy of the text of the CDDL should have accompanied this
8 8 .\" source. A copy of the CDDL is also available via the Internet at
9 9 .\" http://www.illumos.org/license/CDDL.
10 10 .\"
11 11 .\"
12 12 .\" Copyright 2017, Richard Lowe.
13 13 .\"
14 14 .Dd Jan 18, 2017
15 15 .Dt VMEM_WALK 9F
16 16 .Os
17 17 .Sh NAME
18 18 .Nm vmem_walk ,
19 19 .Nm vmem_size
20 20 .Nd walk a (sub\-)set of the segments in a vmem arena
21 21 .Sh SYNOPSIS
22 22 .In sys/vmem.h
23 23 .Ft void
24 24 .Fo vmem_walk
25 25 .Fa "vmem_t *vmp"
26 26 .Fa "int typemask"
27 27 .Fa "void (*func)(void *, void *, size_t)"
28 28 .Fa "void *arg"
29 29 .Fc
↓ open down ↓ |
29 lines elided |
↑ open up ↑ |
30 30 .Ft size_t
31 31 .Fo vmem_size
32 32 .Fa "vmem_t *vmp"
33 33 .Fa "int typemask"
34 34 .Fc
35 35 .Sh INTERFACE LEVEL
36 36 illumos DDI specific
37 37 .Sh PARAMETERS
38 38 .Bl -tag -width Ds
39 39 .It Fa vmp
40 -The vmem arena to walk
40 +The vmem arena to walk.
41 41 .It Fa typemask
42 -A bitmask indicating the types of segment to operate on
42 +A bitmask indicating the types of segment to operate on.
43 43 .Bl -tag -width Ds
44 44 .It Dv VMEM_ALLOC
45 -Allocated segments
45 +Allocated segments.
46 46 .It Dv VMEM_FREE
47 -Free segments
47 +Free segments.
48 48 .El
49 49 .It Fa func
50 50 The function to apply to each segment matching
51 51 .Fa typemask .
52 52 .Fa func
53 -should be of 3 values and return void:
53 +should accept 3 arguments and return void:
54 54 .Bl -tag -width Ds
55 55 .It Fa "void *arg"
56 56 The
57 57 .Fa arg
58 58 passed to
59 -.Fn vmem_walk
59 +.Fn vmem_walk .
60 60 .It Fa "void *vaddr"
61 -The base address of the segment
61 +The base address of the segment.
62 62 .It Fa "size_t size"
63 -The size of the segment
63 +The size of the segment.
64 64 .El
65 65 .It Fa arg
66 66 An arbitrary argument passed to each call to
67 -.Fn func
67 +.Fn func .
68 68 .El
69 69 .Sh DESCRIPTION
70 70 .Fn vmem_walk
71 71 walks each segment in the arena
72 72 .Fa vmp
73 73 and applies
74 74 .Fa func
75 75 to each which matches
76 76 .Fa typemask .
77 77 .Pp
78 78 .Fn vmem_size
79 79 walks each segment in the arena
80 80 .Fa vmp
81 81 and totals the size of each matching
82 82 .Fa typemask .
83 83 .Sh CONTEXT
84 84 This function may be called from user or kernel context.
85 85 .Sh SEE ALSO
86 86 .Xr vmem 9 ,
87 87 .Xr vmem_alloc 9F ,
88 88 .Xr vmem_create 9F
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX