Print this page
12198 typo paramter in some section 3pool man pages
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3pool/pool_resource_create.3pool
+++ new/usr/src/man/man3pool/pool_resource_create.3pool
1 1 '\" te
2 2 .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
3 3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 -.TH POOL_RESOURCE_CREATE 3POOL "April 9, 2016"
6 +.TH POOL_RESOURCE_CREATE 3POOL "January 15, 2020"
7 7 .SH NAME
8 8 pool_resource_create, pool_resource_destroy, pool_resource_info,
9 9 pool_query_resource_components, pool_resource_transfer, pool_resource_xtransfer
10 10 \- resource pool resource manipulation functions
11 11 .SH SYNOPSIS
12 -.LP
13 12 .nf
14 13 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lpool\fR [ \fIlibrary\fR\&.\|.\|. ]
15 14 #include <pool.h>
16 15
17 16 \fBpool_resource_t *\fR\fBpool_resource_create\fR(\fBpool_conf_t *\fR\fIconf\fR,
18 17 \fBconst char *\fR\fItype\fR, \fBconst char *\fR\fIname\fR);
19 18 .fi
20 19
21 20 .LP
22 21 .nf
23 22 \fBint\fR \fBpool_resource_destroy\fR(\fBpool_conf_t *\fR\fIconf\fR,
24 23 \fBpool_resource_t *\fR\fIresource\fR);
25 24 .fi
26 25
27 26 .LP
28 27 .nf
29 28 \fBconst char *\fR\fBpool_resource_info\fR(\fBpool_conf_t *\fR\fIconf\fR
30 29 \fBpool_resource_t *\fR\fIresource\fR, \fBint\fR \fIflags\fR);
31 30 .fi
32 31
33 32 .LP
34 33 .nf
35 34 \fBpool_component_t **\fR\fBpool_query_resource_components\fR(
36 35 \fBpool_conf_t *\fR\fIconf\fR, \fBpool_resource_t *\fR\fIresource\fR,
37 36 \fBuint_t *\fR\fInelem\fR, \fBpool_value_t **\fR\fIprops\fR);
38 37 .fi
39 38
40 39 .LP
41 40 .nf
42 41 \fBint\fR \fBpool_resource_transfer\fR(\fBpool_conf_t *\fR\fIconf\fR,
43 42 \fBpool_resource_t *\fR\fIsource\fR, \fBpool_resource_t *\fR\fItarget\fR,
44 43 \fBuint64_t\fR \fIsize\fR);
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
45 44 .fi
46 45
47 46 .LP
48 47 .nf
49 48 \fBint\fR \fBpool_resource_xtransfer\fR(\fBpool_conf_t *\fR\fIconf\fR,
50 49 \fBpool_resource_t *\fR\fIsource\fR, \fBpool_resource_t *\fR\fItarget\fR,
51 50 \fBpool_component_t **\fR\fIcomponents\fR);
52 51 .fi
53 52
54 53 .SH DESCRIPTION
55 -.LP
56 54 The \fBpool_resource_create()\fR function creates and returns a new resource of
57 55 the given \fIname\fR and \fItype\fR in the provided configuration. If there is
58 56 already a resource of the given name, the operation will fail.
59 57 .sp
60 58 .LP
61 59 The \fBpool_resource_destroy()\fR function removes the specified \fIresource\fR
62 60 from its configuration file.
63 61 .sp
64 62 .LP
65 63 The \fBpool_resource_info()\fR function returns a string describing the given
66 64 \fIresource\fR. The string is allocated with \fBmalloc\fR(3C). The caller is
67 65 responsible for freeing the returned string. If the \fIflags\fR argument is
68 66 non-zero, the string returned also describes the components (if any) contained
69 67 in the resource.
70 68 .sp
71 69 .LP
72 70 The \fBpool_query_resource_components()\fR function returns a null-terminated
73 71 array of the components (if any) that comprise the given resource.
74 72 .sp
75 73 .LP
76 74 The \fBpool_resource_transfer()\fR function transfers \fIsize\fR basic units
77 75 from the \fIsource\fR resource to the \fItarget\fR. Both resources must be of
78 76 the same type for the operation to succeed. Transferring component resources,
79 77 such as processors, is always performed as series of
80 78 \fBpool_resource_xtransfer()\fR operations, since discrete resources must be
81 79 identified for transfer.
82 80 .sp
83 81 .LP
↓ open down ↓ |
18 lines elided |
↑ open up ↑ |
84 82 The \fBpool_resource_xtransfer()\fR function transfers the specific
85 83 \fIcomponents\fR from the \fIsource\fR resource to the \fItarget\fR. Both
86 84 resources must be of the same type, and of a type that contains components
87 85 (such as processor sets). The \fIcomponents\fR argument is a null-terminated
88 86 list of \fBpool_component_t\fR.
89 87 .sp
90 88 .LP
91 89 The \fIconf\fR argument for each function refers to the target configuration to
92 90 which the operation applies.
93 91 .SH RETURN VALUES
94 -.LP
95 92 Upon successful completion, \fBpool_resource_create()\fR returns a new
96 93 \fBpool_resource_t\fR with default properties initialized. Otherwise,
97 94 \fINULL\fR is returned and \fBpool_error\fR(3POOL) returns the pool-specific
98 95 error value.
99 96 .sp
100 97 .LP
101 98 Upon successful completion, \fBpool_resource_destroy()\fR returns 0. Otherwise,
102 99 -1 is returned and \fBpool_error()\fR returns the pool-specific error value.
103 100 .sp
104 101 .LP
105 102 Upon successful completion, \fBpool_resource_info()\fR returns a string
106 103 describing the given resource (and optionally its components). Otherwise,
107 104 \fINULL\fR is returned and \fBpool_error()\fR returns the pool-specific error
108 105 value.
109 106 .sp
110 107 .LP
111 - Upon successful completion, \fBpool_query_resource_components()\fR returns a
108 +Upon successful completion, \fBpool_query_resource_components()\fR returns a
112 109 null-terminated array of \fBpool_component_t *\fR that match the provided
113 110 null-terminated property list and are contained in the given resource.
114 111 Otherwise, \fINULL\fR is returned and \fBpool_error()\fR returns the
115 112 pool-specific error value.
116 113 .sp
117 114 .LP
118 - Upon successful completion, \fBpool_resource_transfer()\fR and
115 +Upon successful completion, \fBpool_resource_transfer()\fR and
119 116 \fBpool_resource_xtransfer()\fR return 0. Otherwise -1 is returned and
120 117 \fBpool_error()\fR returns the pool-specific error value.
121 118 .SH ERRORS
122 -.LP
123 119 The \fBpool_resource_create()\fR function will fail if:
124 120 .sp
125 121 .ne 2
126 122 .na
127 123 \fB\fBPOE_BADPARAM\fR\fR
128 124 .ad
129 125 .RS 20n
130 126 The supplied configuration's status is not \fBPOF_VALID\fR or \fIname\fR is in
131 127 use for this resource type.
132 128 .RE
133 129
134 130 .sp
135 131 .ne 2
136 132 .na
137 133 \fB\fBPOE_INVALID_CONF\fR\fR
138 134 .ad
139 135 .RS 20n
140 136 The resource element could not be created because the configuration would be
141 137 invalid.
142 138 .RE
143 139
144 140 .sp
145 141 .ne 2
146 142 .na
147 143 \fB\fBPOE_PUTPROP\fR\fR
148 144 .ad
149 145 .RS 20n
150 146 One of the supplied properties could not be set.
151 147 .RE
152 148
153 149 .sp
154 150 .ne 2
155 151 .na
156 152 \fB\fBPOE_SYSTEM\fR\fR
157 153 .ad
158 154 .RS 20n
159 155 A system error has occurred. Check the system error code for more details.
160 156 .RE
161 157
162 158 .sp
163 159 .LP
164 160 The \fBpool_resource_destroy()\fR function will fail if:
165 161 .sp
166 162 .ne 2
167 163 .na
168 164 \fB\fBPOE_BADPARAM\fR\fR
169 165 .ad
170 166 .RS 16n
171 167 The supplied configuration's status is not \fBPOF_VALID\fR.
172 168 .RE
173 169
↓ open down ↓ |
41 lines elided |
↑ open up ↑ |
174 170 .sp
175 171 .LP
176 172 The \fBpool_resource_info()\fR function will fail if:
177 173 .sp
178 174 .ne 2
179 175 .na
180 176 \fB\fBPOE_BADPARAM\fR\fR
181 177 .ad
182 178 .RS 20n
183 179 The supplied configuration's status is not \fBPOF_VALID\fR or the \fIflags\fR
184 -paramter is neither 0 nor 1.
180 +parameter is neither 0 nor 1.
185 181 .RE
186 182
187 183 .sp
188 184 .ne 2
189 185 .na
190 186 \fB\fBPOE_INVALID_CONF\fR\fR
191 187 .ad
192 188 .RS 20n
193 189 The configuration is invalid.
194 190 .RE
195 191
196 192 .sp
197 193 .ne 2
198 194 .na
199 195 \fB\fBPOE_SYSTEM\fR\fR
200 196 .ad
201 197 .RS 20n
202 198 A system error has occurred. Check the system error code for more details.
203 199 .RE
204 200
205 201 .sp
206 202 .LP
207 203 The \fBpool_query_resource_components()\fR function will fail if:
208 204 .sp
209 205 .ne 2
210 206 .na
211 207 \fB\fBPOE_BADPARAM\fR\fR
212 208 .ad
213 209 .RS 20n
214 210 The supplied configuration's status is not \fBPOF_VALID\fR.
215 211 .RE
216 212
217 213 .sp
218 214 .ne 2
219 215 .na
220 216 \fB\fBPOE_INVALID_CONF\fR\fR
221 217 .ad
222 218 .RS 20n
223 219 The configuration is invalid.
224 220 .RE
225 221
226 222 .sp
227 223 .ne 2
228 224 .na
229 225 \fB\fBPOE_SYSTEM\fR\fR
230 226 .ad
231 227 .RS 20n
232 228 A system error has occurred. Check the system error code for more details.
233 229 .RE
234 230
235 231 .sp
236 232 .LP
237 233 The \fBpool_resource_transfer()\fR function will fail if:
238 234 .sp
239 235 .ne 2
240 236 .na
241 237 \fB\fBPOE_BADPARAM\fR\fR
242 238 .ad
243 239 .RS 16n
244 240 The supplied configuration's status is not \fBPOF_VALID\fR, the two resources
245 241 are not of the same type, or the transfer would cause either of the resources
246 242 to exceed their \fBmin\fR and \fBmax\fR properties.
247 243 .RE
248 244
249 245 .sp
250 246 .ne 2
251 247 .na
252 248 \fB\fBPOE_SYSTEM\fR\fR
253 249 .ad
254 250 .RS 16n
255 251 A system error has occurred. Check the system error code for more details.
256 252 .RE
257 253
258 254 .sp
259 255 .LP
260 256 The \fBpool_resource_xtransfer()\fR function will fail if:
261 257 .sp
262 258 .ne 2
263 259 .na
264 260 \fB\fBPOE_BADPARAM\fR\fR
265 261 .ad
266 262 .RS 20n
267 263 The supplied configuration's status is not \fBPOF_VALID\fR, the two resources
268 264 are not of the same type, or the supplied resources do not belong to the
269 265 source.
270 266 .RE
271 267
272 268 .sp
273 269 .ne 2
274 270 .na
275 271 \fB\fBPOE_INVALID_CONF\fR\fR
276 272 .ad
277 273 .RS 20n
278 274 The transfer operation failed and the configuration may be invalid.
279 275 .RE
280 276
↓ open down ↓ |
86 lines elided |
↑ open up ↑ |
281 277 .sp
282 278 .ne 2
283 279 .na
284 280 \fB\fBPOE_SYSTEM\fR\fR
285 281 .ad
286 282 .RS 20n
287 283 A system error has occurred. Check the system error code for more details.
288 284 .RE
289 285
290 286 .SH EXAMPLES
291 -.LP
292 287 \fBExample 1 \fRCreate a new resource of type \fBpset\fR named \fBfoo\fR.
293 288 .sp
294 289 .in +2
295 290 .nf
296 291 #include <pool.h>
297 292 #include <stdio.h>
298 293
299 294 \&...
300 295
301 296 pool_conf_t *conf;
302 297 pool_resource_t *resource;
303 298 \&...
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
304 299
305 300 if ((resource = pool_resource_create(conf, "pset",
306 301 "foo")) == NULL) {
307 302 (void) fprintf(stderr, "Cannot create resource\\B{}n");
308 303 ...
309 304 }
310 305 .fi
311 306 .in -2
312 307
313 308 .SH ATTRIBUTES
314 -.LP
315 309 See \fBattributes\fR(5) for descriptions of the following attributes:
316 310 .sp
317 311
318 312 .sp
319 313 .TS
320 314 box;
321 315 c | c
322 316 l | l .
323 317 ATTRIBUTE TYPE ATTRIBUTE VALUE
324 318 _
325 319 CSI Enabled
326 320 _
327 321 Interface Stability Unstable
328 322 _
329 323 MT-Level Safe
330 324 .TE
331 325
332 326 .SH SEE ALSO
333 -.LP
334 327 \fBlibpool\fR(3LIB), \fBpool_error\fR(3POOL), \fBattributes\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX