Print this page
12202 noise in example code in some section 3pool man pages

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3pool/pool_get_binding.3pool
          +++ new/usr/src/man/man3pool/pool_get_binding.3pool
   1    1  '\" te
   2    2  .\" Copyright (c) 2007, 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_GET_BINDING 3POOL "Mar 27, 2007"
        6 +.TH POOL_GET_BINDING 3POOL "January 18, 2020"
   7    7  .SH NAME
   8    8  pool_get_binding, pool_set_binding, pool_get_resource_binding \- set and query
   9    9  process to resource pool bindings
  10   10  .SH SYNOPSIS
  11      -.LP
  12   11  .nf
  13   12  cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lpool\fR [ \fIlibrary\fR\&.\|.\|. ]
  14   13  #include <pool.h>
  15   14  
  16   15  \fBchar *\fR\fBpool_get_binding\fR(\fBpid_t\fR \fIpid\fR);
  17   16  .fi
  18   17  
  19   18  .LP
  20   19  .nf
  21   20  \fBint\fR \fBpool_set_binding\fR(\fBconst char *\fR\fIpool\fR, \fBidtype_t\fR \fIidtype\fR,
  22   21       \fBid_t\fR \fIid\fR);
  23   22  .fi
  24   23  
  25   24  .LP
  26   25  .nf
  27   26  \fBchar *\fR\fBpool_get_resource_binding\fR(\fBconst char *\fR\fItype\fR, \fBpid_t\fR \fIpid\fR);
  28   27  .fi
  29   28  
  30   29  .SH DESCRIPTION
  31      -.sp
  32      -.LP
  33   30  The \fBpool_get_binding()\fR function returns the name of the pool on the
  34   31  running system that contains the set of resources to which the given process is
  35   32  bound. If no such pool exists on the system or the search returns more than one
  36   33  pool (since the set of resources is referred to by more than one pool),
  37   34  \fINULL\fR is  returned and the pool error value is set to
  38   35  \fBPOE_INVALID_SEARCH\fR.
  39   36  .sp
  40   37  .LP
  41   38  It is possible that one of the resources to which the given process is bound is
  42   39  not associated with a pool. This could occur if a processor set was created
↓ open down ↓ 3 lines elided ↑ open up ↑
  46   43  associated with a pool.
  47   44  .sp
  48   45  .LP
  49   46  The \fBpool_set_binding()\fR function binds the processes matching \fIidtype\fR
  50   47  and \fIid\fR to the resources associated with \fIpool\fR on the running system.
  51   48  This function requires the privilege required by the underlying resource types
  52   49  referenced by the pool; generally, this requirement is equivalent to requiring
  53   50  superuser privilege.
  54   51  .sp
  55   52  .LP
  56      -The \fIidtype\fR parameter can be of the following types:
       53 +The \fIidtype\fR parameter can be one of the following types:
  57   54  .sp
  58   55  .ne 2
  59   56  .na
  60   57  \fB\fBP_PID\fR\fR
  61   58  .ad
  62   59  .RS 12n
  63   60  The \fIid\fR parameter is a pid.
  64   61  .RE
  65   62  
  66   63  .sp
↓ open down ↓ 14 lines elided ↑ open up ↑
  81   78  The \fIid\fR parameter is a project ID. All currently running processes
  82   79  belonging to the given project will be bound to the pool's resources.
  83   80  .RE
  84   81  
  85   82  .sp
  86   83  .LP
  87   84  The \fBpool_get_resource_binding()\fR function returns the name of the resource
  88   85  of the supplied type to which the supplied process is bound.
  89   86  .sp
  90   87  .LP
  91      -The application must explicity free the memory allocated for the return values
       88 +The application must explicitly free the memory allocated for the return values
  92   89  for \fBpool_get_binding()\fR and \fBpool_get_resource_binding()\fR.
  93   90  .SH RETURN VALUES
  94      -.sp
  95      -.LP
  96   91  Upon successful completion, \fBpool_get_binding()\fR returns the name of the
  97   92  pool to which the process is bound. Otherwise it returns \fINULL\fR and
  98   93  \fBpool_error\fR(3POOL) returns the pool-specific error value.
  99   94  .sp
 100   95  .LP
 101   96  Upon successful completion, \fBpool_set_binding()\fR returns \fBPO_SUCCESS\fR.
 102   97  Otherwise, it returns \fBPO_FAIL\fR and \fBpool_error()\fR returns the
 103   98  pool-specific error value.
 104   99  .sp
 105  100  .LP
 106  101  Upon successful completion, \fBpool_get_resource_binding()\fR returns the name
 107  102  of the resource of the specified type to which the process is bound. Otherwise
 108  103  it returns \fINULL\fR and \fBpool_error()\fR returns the pool-specific error
 109  104  value.
 110  105  .SH ERRORS
 111      -.sp
 112      -.LP
 113  106  The \fBpool_get_binding()\fR function will fail if:
 114  107  .sp
 115  108  .ne 2
 116  109  .na
 117  110  \fB\fBPOE_INVALID_CONF\fR\fR
 118  111  .ad
 119  112  .RS 22n
 120  113  The configuration is invalid.
 121  114  .RE
 122  115  
↓ open down ↓ 71 lines elided ↑ open up ↑
 194  187  .sp
 195  188  .ne 2
 196  189  .na
 197  190  \fB\fBPOE_SYSTEM\fR\fR
 198  191  .ad
 199  192  .RS 22n
 200  193  A system error has occurred. Check the system error code for more details.
 201  194  .RE
 202  195  
 203  196  .SH EXAMPLES
 204      -.LP
 205  197  \fBExample 1 \fRBind the current process to the pool named "target".
 206  198  .sp
 207  199  .in +2
 208  200  .nf
 209  201  #include <sys/types.h>
 210  202  #include <pool.h>
 211  203  #include <unistd.h>
 212  204  
 213  205  \&...
 214  206  
 215  207  id_t pid = getpid();
 216  208  
 217  209  \&...
 218  210  
 219  211  if (pool_set_binding("target", P_PID, pid) == PO_FAIL) \{
 220      -        (void) fprintf(stderr, "pool binding failed (\\%d)\\B{}n",
      212 +        (void) fprintf(stderr, "pool binding failed (%d)\\n",
 221  213                   pool_error());
 222  214  \}
 223  215  .fi
 224  216  .in -2
 225  217  
 226  218  .SH ATTRIBUTES
 227      -.sp
 228      -.LP
 229  219  See \fBattributes\fR(5) for descriptions of the following attributes:
 230  220  .sp
 231  221  
 232  222  .sp
 233  223  .TS
 234  224  box;
 235  225  c | c
 236  226  l | l .
 237  227  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 238  228  _
 239  229  CSI     Enabled
 240  230  _
 241  231  Interface Stability     Unstable
 242  232  _
 243  233  MT-Level        Safe
 244  234  .TE
 245  235  
 246  236  .SH SEE ALSO
 247      -.sp
 248      -.LP
 249  237  \fBlibpool\fR(3LIB), \fBpool_error\fR(3POOL), \fBattributes\fR(5)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX