Print this page
9842 man page typos and spelling
   1 '\" te
   2 .\" Copyright (c) 2009, 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. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
   4 .\"  See the License for the specific language governing permissions and limitations under the License. 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
   5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH PSET_BIND 2 "Mar 13, 2009"
   7 .SH NAME
   8 pset_bind \- bind LWPs to a set of processors
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <sys/pset.h>
  13 
  14 \fBint\fR \fBpset_bind\fR(\fBpsetid_t\fR \fIpset\fR, \fBidtype_t\fR \fIidtype\fR, \fBid_t\fR \fIid\fR, \fBpsetid_t *\fR\fIopset\fR);
  15 .fi
  16 
  17 .SH DESCRIPTION
  18 .sp
  19 .LP
  20 The \fBpset_bind()\fR function binds the \fBLWP\fR or set of \fBLWPs\fR
  21 specified by \fIidtype\fR and \fIid\fR to the processor set specified by
  22 \fIpset\fR. If \fIopset\fR is not \fINULL\fR, \fBpset_bind()\fR sets the
  23 \fBpsetid_t\fR variable pointed to by \fIopset\fR to the previous processor set
  24 binding of one of the specified \fBLWP\fR, or to \fBPS_NONE\fR if the selected
  25 \fBLWP\fR was not bound.
  26 .sp
  27 .LP
  28 If \fIidtype\fR is \fBP_PID\fR, the binding affects all \fBLWP\fRs of the
  29 process with process \fBID\fR (PID) \fIid\fR.
  30 .sp
  31 .LP
  32 If \fIidtype\fR is \fBP_LWPID\fR, the binding affects the \fBLWP\fR of the
  33 current process with \fBLWP ID\fR \fIid\fR.
  34 .sp
  35 .LP
  36 If \fIidtype\fR is \fBP_TASKID\fR, the binding affects all LWPs of all
  37 processes with task ID \fIid\fR.
  38 .sp


  60 If \fIpset\fR is \fBPS_QUERY\fR, the processor set bindings are not changed.
  61 .sp
  62 .LP
  63 If \fIpset\fR is \fBPS_MYID\fR, the specified LWPs are bound to the same
  64 processor set as the caller. If the caller is not bound to a processor set, the
  65 processor set bindings are cleared.
  66 .sp
  67 .LP
  68 The {\fBPRIV_SYS_RES_CONFIG\fR} privilege must be asserted in the effective set
  69 of the calling process or \fIpset\fR must be \fBPS_QUERY\fR.
  70 .sp
  71 .LP
  72 LWPs that have been bound to a processor with \fBprocessor_bind\fR(2) may also
  73 be bound to a processor set if the processor is part of the processor set. If
  74 this occurs, the binding to the processor remains in effect. If the processor
  75 binding is later removed, the processor set binding becomes effective.
  76 .sp
  77 .LP
  78 Processor set bindings are inherited across \fBfork\fR(2) and \fBexec\fR(2).
  79 .SH RETURN VALUES
  80 .sp
  81 .LP
  82 Upon successful completion, 0 is returned. Otherwise, \(mi1 is returned and
  83 \fBerrno\fR is set to indicate the error.
  84 .SH ERRORS
  85 .sp
  86 .LP
  87 The \fBpset_bind()\fR function will fail if:
  88 .sp
  89 .ne 2
  90 .na
  91 \fB\fBEBUSY\fR\fR
  92 .ad
  93 .RS 11n
  94 One of the \fBLWP\fRs is bound to a processor, and the specified processor set
  95 does not include that processor.
  96 .RE
  97 
  98 .sp
  99 .ne 2
 100 .na
 101 \fB\fBEFAULT\fR\fR
 102 .ad
 103 .RS 11n
 104 The location pointed to by \fIopset\fR was not \fINULL\fR and not writable by
 105 the user.


 119 .sp
 120 .ne 2
 121 .na
 122 \fB\fBENOTSUP\fR\fR
 123 .ad
 124 .RS 11n
 125 The pools facility is active.  See \fBpooladm\fR(1M) and
 126 \fBpool_set_status\fR(3POOL) for information about enabling and disabling the
 127 pools facility. Processes can be bound to pools using the \fBpoolbind\fR(1M)
 128 utility or the \fBpool_set_binding\fR(3POOL) function.
 129 .sp
 130 Binding a system process to a processor set is not supported.
 131 .RE
 132 
 133 .sp
 134 .ne 2
 135 .na
 136 \fB\fBEPERM\fR\fR
 137 .ad
 138 .RS 11n
 139 The {\fBPRIV_PROC_OWNER\fR} is not asserted in the effecive set of the calling
 140 process and either the real or effective user ID of the calling process does
 141 not match the real or effective user \fBID\fR of one of the LWPs being bound,
 142 or the processor set from which one or more of the LWPs are being unbound has
 143 the \fBPSET_NOESCAPE\fR attribute set and {\fBPRIV_SYS_RES_CONFIG\fR) is not
 144 asserted in the effective set of the calling process. See \fBpset_setattr\fR(2)
 145 for more information about processor set attributes.
 146 .RE
 147 
 148 .sp
 149 .ne 2
 150 .na
 151 \fB\fBESRCH\fR\fR
 152 .ad
 153 .RS 11n
 154 No processes, \fBLWP\fRs, or tasks were found to match the criteria specified
 155 by \fIidtype\fR and \fIid\fR.
 156 .RE
 157 
 158 .SH ATTRIBUTES
 159 .sp
 160 .LP
 161 See \fBattributes\fR(5) for descriptions of the following attributes:
 162 .sp
 163 
 164 .sp
 165 .TS
 166 box;
 167 c | c
 168 l | l .
 169 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 170 _
 171 Interface Stability     Committed
 172 _
 173 MT-Level        Async-Signal-Safe
 174 .TE
 175 
 176 .SH SEE ALSO
 177 .sp
 178 .LP
 179 \fBpbind\fR(1M), \fBpooladm\fR(1M), \fBpoolbind\fR(1M), \fBpsrset\fR(1M),
 180 \fBexec\fR(2), \fBfork\fR(2), \fBprocessor_bind\fR(2), \fBpset_create\fR(2),
 181 \fBpset_info\fR(2), \fBpset_setattr\fR(2), \fBpool_set_binding\fR(3POOL),
 182 \fBpool_set_status\fR(3POOL), \fBpset_getloadavg\fR(3C), \fBprocess\fR(4),
 183 \fBproject\fR(4), \fBattributes\fR(5), \fBprivileges\fR(5)
   1 '\" te
   2 .\" Copyright (c) 2009, 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. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
   4 .\"  See the License for the specific language governing permissions and limitations under the License. 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
   5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH PSET_BIND 2 "Mar 13, 2009"
   7 .SH NAME
   8 pset_bind \- bind LWPs to a set of processors
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <sys/pset.h>
  13 
  14 \fBint\fR \fBpset_bind\fR(\fBpsetid_t\fR \fIpset\fR, \fBidtype_t\fR \fIidtype\fR, \fBid_t\fR \fIid\fR, \fBpsetid_t *\fR\fIopset\fR);
  15 .fi
  16 
  17 .SH DESCRIPTION

  18 .LP
  19 The \fBpset_bind()\fR function binds the \fBLWP\fR or set of \fBLWPs\fR
  20 specified by \fIidtype\fR and \fIid\fR to the processor set specified by
  21 \fIpset\fR. If \fIopset\fR is not \fINULL\fR, \fBpset_bind()\fR sets the
  22 \fBpsetid_t\fR variable pointed to by \fIopset\fR to the previous processor set
  23 binding of one of the specified \fBLWP\fR, or to \fBPS_NONE\fR if the selected
  24 \fBLWP\fR was not bound.
  25 .sp
  26 .LP
  27 If \fIidtype\fR is \fBP_PID\fR, the binding affects all \fBLWP\fRs of the
  28 process with process \fBID\fR (PID) \fIid\fR.
  29 .sp
  30 .LP
  31 If \fIidtype\fR is \fBP_LWPID\fR, the binding affects the \fBLWP\fR of the
  32 current process with \fBLWP ID\fR \fIid\fR.
  33 .sp
  34 .LP
  35 If \fIidtype\fR is \fBP_TASKID\fR, the binding affects all LWPs of all
  36 processes with task ID \fIid\fR.
  37 .sp


  59 If \fIpset\fR is \fBPS_QUERY\fR, the processor set bindings are not changed.
  60 .sp
  61 .LP
  62 If \fIpset\fR is \fBPS_MYID\fR, the specified LWPs are bound to the same
  63 processor set as the caller. If the caller is not bound to a processor set, the
  64 processor set bindings are cleared.
  65 .sp
  66 .LP
  67 The {\fBPRIV_SYS_RES_CONFIG\fR} privilege must be asserted in the effective set
  68 of the calling process or \fIpset\fR must be \fBPS_QUERY\fR.
  69 .sp
  70 .LP
  71 LWPs that have been bound to a processor with \fBprocessor_bind\fR(2) may also
  72 be bound to a processor set if the processor is part of the processor set. If
  73 this occurs, the binding to the processor remains in effect. If the processor
  74 binding is later removed, the processor set binding becomes effective.
  75 .sp
  76 .LP
  77 Processor set bindings are inherited across \fBfork\fR(2) and \fBexec\fR(2).
  78 .SH RETURN VALUES

  79 .LP
  80 Upon successful completion, 0 is returned. Otherwise, \(mi1 is returned and
  81 \fBerrno\fR is set to indicate the error.
  82 .SH ERRORS

  83 .LP
  84 The \fBpset_bind()\fR function will fail if:
  85 .sp
  86 .ne 2
  87 .na
  88 \fB\fBEBUSY\fR\fR
  89 .ad
  90 .RS 11n
  91 One of the \fBLWP\fRs is bound to a processor, and the specified processor set
  92 does not include that processor.
  93 .RE
  94 
  95 .sp
  96 .ne 2
  97 .na
  98 \fB\fBEFAULT\fR\fR
  99 .ad
 100 .RS 11n
 101 The location pointed to by \fIopset\fR was not \fINULL\fR and not writable by
 102 the user.


 116 .sp
 117 .ne 2
 118 .na
 119 \fB\fBENOTSUP\fR\fR
 120 .ad
 121 .RS 11n
 122 The pools facility is active.  See \fBpooladm\fR(1M) and
 123 \fBpool_set_status\fR(3POOL) for information about enabling and disabling the
 124 pools facility. Processes can be bound to pools using the \fBpoolbind\fR(1M)
 125 utility or the \fBpool_set_binding\fR(3POOL) function.
 126 .sp
 127 Binding a system process to a processor set is not supported.
 128 .RE
 129 
 130 .sp
 131 .ne 2
 132 .na
 133 \fB\fBEPERM\fR\fR
 134 .ad
 135 .RS 11n
 136 The {\fBPRIV_PROC_OWNER\fR} is not asserted in the effective set of the calling
 137 process and either the real or effective user ID of the calling process does
 138 not match the real or effective user \fBID\fR of one of the LWPs being bound,
 139 or the processor set from which one or more of the LWPs are being unbound has
 140 the \fBPSET_NOESCAPE\fR attribute set and {\fBPRIV_SYS_RES_CONFIG\fR) is not
 141 asserted in the effective set of the calling process. See \fBpset_setattr\fR(2)
 142 for more information about processor set attributes.
 143 .RE
 144 
 145 .sp
 146 .ne 2
 147 .na
 148 \fB\fBESRCH\fR\fR
 149 .ad
 150 .RS 11n
 151 No processes, \fBLWP\fRs, or tasks were found to match the criteria specified
 152 by \fIidtype\fR and \fIid\fR.
 153 .RE
 154 
 155 .SH ATTRIBUTES

 156 .LP
 157 See \fBattributes\fR(5) for descriptions of the following attributes:
 158 .sp
 159 
 160 .sp
 161 .TS
 162 box;
 163 c | c
 164 l | l .
 165 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 166 _
 167 Interface Stability     Committed
 168 _
 169 MT-Level        Async-Signal-Safe
 170 .TE
 171 
 172 .SH SEE ALSO

 173 .LP
 174 \fBpbind\fR(1M), \fBpooladm\fR(1M), \fBpoolbind\fR(1M), \fBpsrset\fR(1M),
 175 \fBexec\fR(2), \fBfork\fR(2), \fBprocessor_bind\fR(2), \fBpset_create\fR(2),
 176 \fBpset_info\fR(2), \fBpset_setattr\fR(2), \fBpool_set_binding\fR(3POOL),
 177 \fBpool_set_status\fR(3POOL), \fBpset_getloadavg\fR(3C), \fBprocess\fR(4),
 178 \fBproject\fR(4), \fBattributes\fR(5), \fBprivileges\fR(5)