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