1 '\" te 2 .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. 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 .\" 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 .\" 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_COMPONENT_INFO 3POOL "April 9, 2016" 7 .SH NAME 8 pool_component_info, pool_get_owning_resource \- resource pool component 9 functions 10 .SH SYNOPSIS 11 .LP 12 .nf 13 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lpool\fR [ \fIlibrary\fR\&.\|.\|. ] 14 #include <pool.h> 15 16 \fBconst char *\fR\fBpool_component_info\fR(\fBpool_conf_t *\fR\fIconf\fR, 17 \fBpool_component_t *\fR\fIcomponent\fR, \fBint\fR \fIflags\fR); 18 .fi 19 20 .LP 21 .nf 22 \fBpool_resource_t *\fR\fBpool_get_owning_resource\fR(\fBpool_conf_t *\fR\fIconf\fR, 23 \fBpool_component_t *\fR\fIcomponent\fR); 24 .fi 25 26 .SH DESCRIPTION 27 .LP 28 Certain resources, such as processor sets, are composed of resource components. 29 Informational and ownership attributes of resource components are made 30 available with the \fBpool_component_info()\fR and 31 \fBpool_get_owning_resource()\fR functions. The \fIconf\fR argument for each 32 function refers to the target configuration to which the operation applies. 33 .sp 34 .LP 35 The \fBpool_component_info()\fR function returns a string describing 36 \fIcomponent\fR. The string is allocated with \fBmalloc\fR(3C). The caller is 37 responsible for freeing the returned string. The \fIflags\fR argument is 38 ignored. 39 .sp 40 .LP 41 The \fBpool_get_owning_resource()\fR function returns the resource currently 42 containing \fIcomponent\fR. Every component is contained by a resource. 43 .SH RETURN VALUES 44 .LP 45 Upon successful completion, \fBpool_component_info()\fR returns a string. 46 Otherwise it returns \fINULL\fR and \fBpool_error\fR(3POOL) returns the 47 pool-specific error value. 48 .sp 49 .LP 50 Upon successful completion, \fBpool_get_owning_resource()\fR returns the owning 51 resource. Otherwise it returns \fINULL\fR and \fBpool_error()\fR returns the 52 pool-specific error value. 53 .SH ERRORS 54 .LP 55 The \fBpool_component_info()\fR function will fail if: 56 .sp 57 .ne 2 58 .na 59 \fB\fBPOE_BADPARAM\fR\fR 60 .ad 61 .RS 20n 62 The supplied configuration's status is not \fBPOF_VALID\fR or the \fIflags\fR 63 paramter is neither 0 or 1. 64 .RE 65 66 .sp 67 .ne 2 68 .na 69 \fB\fBPOE_INVALID_CONF\fR\fR 70 .ad 71 .RS 20n 72 The configuration is invalid. 73 .RE 74 75 .sp 76 .ne 2 77 .na 78 \fB\fBPOE_SYSTEM\fR\fR 79 .ad 80 .RS 20n 81 A system error has occurred. Check the system error code for more details. 82 .RE 83 84 .sp 85 .LP 86 The \fBpool_get_owning_resource()\fR function will fail if: 87 .sp 88 .ne 2 89 .na 90 \fB\fBPOE_BADPARAM\fR\fR 91 .ad 92 .RS 16n 93 The supplied configuration's status is not \fBPOF_VALID\fR. 94 .RE 95 96 .SH ATTRIBUTES 97 .LP 98 See \fBattributes\fR(5) for descriptions of the following attributes: 99 .sp 100 101 .sp 102 .TS 103 box; 104 c | c 105 l | l . 106 ATTRIBUTE TYPE ATTRIBUTE VALUE 107 _ 108 CSI Enabled 109 _ 110 Interface Stability Unstable 111 _ 112 MT-Level Safe 113 .TE 114 115 .SH SEE ALSO 116 .LP 117 \fBlibpool\fR(3LIB), \fBpool_error\fR(3POOL), \fBattributes\fR(5)