Print this page
6534 Improve processor_bind(2) EINVAL description
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Garrett D'Amore <garrett@damore.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man2/processor_bind.2
          +++ new/usr/src/man/man2/processor_bind.2
   1    1  '\" te
   2    2  .\" Copyright (c) 2009, 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. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
   4    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    5  .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6      -.TH PROCESSOR_BIND 2 "Mar 13, 2009"
        6 +.TH PROCESSOR_BIND 2 "Dec 27, 2015"
   7    7  .SH NAME
   8    8  processor_bind \- bind LWPs to a processor
   9    9  .SH SYNOPSIS
  10   10  .LP
  11   11  .nf
  12   12  #include <sys/types.h>
  13   13  #include <sys/processor.h>
  14   14  #include <sys/procset.h>
  15   15  
  16   16  \fBint\fR \fBprocessor_bind\fR(\fBidtype_t\fR \fIidtype\fR, \fBid_t\fR \fIid\fR, \fBprocessorid_t\fR \fIprocessorid\fR,
  17   17       \fBprocessorid_t *\fR\fIobind\fR);
  18   18  .fi
  19   19  
  20   20  .SH DESCRIPTION
  21      -.sp
  22   21  .LP
  23   22  The \fBprocessor_bind()\fR function binds the LWP (lightweight process) or set
  24   23  of LWPs specified by \fIidtype\fR and \fIid\fR to the processor specified by
  25   24  \fIprocessorid\fR. If \fIobind\fR is not \fINULL\fR, this function also sets
  26   25  the \fBprocessorid_t\fR variable pointed to by \fIobind\fR to the previous
  27   26  binding of one of the specified LWPs, or to \fBPBIND_NONE\fR if the selected
  28   27  LWP was not bound.
  29   28  .sp
  30   29  .LP
  31   30  If \fIidtype\fR is \fBP_PID\fR, the binding affects all LWPs of the process
↓ open down ↓ 21 lines elided ↑ open up ↑
  53   52  .sp
  54   53  .LP
  55   54  If \fIid\fR is \fBP_MYID\fR, the specified LWP, process, task, or project is
  56   55  the current one.
  57   56  .sp
  58   57  .LP
  59   58  If \fIprocessorid\fR is \fBPBIND_NONE\fR, the processor bindings of the
  60   59  specified LWPs are cleared.
  61   60  .sp
  62   61  .LP
  63      -If  \fIprocessorid\fR is \fBPBIND_QUERY\fR, the processor bindings are not
       62 +If \fIprocessorid\fR is \fBPBIND_QUERY\fR, the processor bindings are not
  64   63  changed.
  65   64  .sp
  66   65  .LP
  67   66  The {\fBPRIV_PROC_OWNER\fR} privilege must be asserted in the effective set of
  68   67  the calling process or the real or effective user ID of the calling process
  69   68  must match the real or effective user ID of the \fBLWP\fRs being bound.  If the
  70   69  calling process does not have permission to change all of the specified LWPs,
  71   70  the bindings of the LWPs for which it does have permission will be changed even
  72   71  though an error is returned.
  73   72  .sp
  74   73  .LP
  75   74  Processor bindings are inherited across \fBfork\fR(2) and \fBexec\fR(2).
  76   75  .SH RETURN VALUES
  77      -.sp
  78   76  .LP
  79   77  Upon successful completion, \fB0\fR is returned.  Otherwise, \fB\(mi1\fR is
  80   78  returned and  \fBerrno\fR is set to indicate the error.
  81   79  .SH ERRORS
  82      -.sp
  83   80  .LP
  84   81  The \fBprocessor_bind()\fR function will fail if:
  85   82  .sp
  86   83  .ne 2
  87   84  .na
  88   85  \fB\fBEFAULT\fR\fR
  89   86  .ad
  90   87  .RS 11n
  91      -The location pointed to by  \fIobind\fR was not \fINULL\fR and not writable by
       88 +The location pointed to by \fIobind\fR was not \fINULL\fR and not writable by
  92   89  the user.
  93   90  .RE
  94   91  
  95   92  .sp
  96   93  .ne 2
  97   94  .na
  98   95  \fB\fBEINVAL\fR\fR
  99   96  .ad
 100   97  .RS 11n
 101      -The specified processor is not on-line, or the \fIidtype\fR argument was not
 102      -\fBP_PID\fR, \fBP_LWPID\fR, \fBP_PROJID\fR, \fBP_TASKID\fR, \fBP_CTID\fR, or
 103      -\fBP_ZONEID\fR.
       98 +The processor is not on-line.
 104   99  .sp
 105      -The caller is in a non-global zone, the pools facility is active, and the
 106      -processor is not a member of the zone's pool's processor set.
      100 +The LWP is bound to a processor set or resource pool for which the
      101 +processor is not a member.
      102 +.sp
      103 +The \fIidtype\fR argument is not \fBP_PID\fR, \fBP_LWPID\fR,
      104 +\fBP_PROJID\fR, \fBP_TASKID\fR, \fBP_CTID\fR, or \fBP_ZONEID\fR.
 107  105  .RE
 108  106  
 109  107  .sp
 110  108  .ne 2
 111  109  .na
 112  110  \fB\fBENOTSUP\fR\fR
 113  111  .ad
 114  112  .RS 11n
 115  113  Binding a system process to a processor set is not supported.
 116  114  .RE
↓ open down ↓ 9 lines elided ↑ open up ↑
 126  124  or effective user \fBID\fR of one of the \fBLWP\fRs being bound.
 127  125  .RE
 128  126  
 129  127  .sp
 130  128  .ne 2
 131  129  .na
 132  130  \fB\fBESRCH\fR\fR
 133  131  .ad
 134  132  .RS 11n
 135  133  No processes, \fBLWP\fRs, or tasks were found to match the criteria specified
 136      -by \fIidtype\fR and  \fIid\fR.
      134 +by \fIidtype\fR and \fIid\fR.
 137  135  .RE
 138  136  
 139  137  .SH ATTRIBUTES
 140      -.sp
 141      -.LP
 142  138  See \fBattributes\fR(5) for descriptions of the following attributes:
 143  139  .sp
 144  140  
 145  141  .sp
 146  142  .TS
 147  143  box;
 148  144  c | c
 149  145  l | l .
 150  146  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 151  147  _
 152  148  Interface Stability     Committed
 153  149  _
 154  150  MT-Level        Async-Signal-Safe
 155  151  .TE
 156  152  
 157  153  .SH SEE ALSO
 158      -.sp
 159      -.LP
 160  154  \fBpooladm\fR(1M), \fBpsradm\fR(1M), \fBpsrinfo\fR(1M), \fBzoneadm\fR(1M),
 161  155  \fBexec\fR(2), \fBfork\fR(2), \fBp_online\fR(2), \fBpset_bind\fR(2),
 162  156  \fBsysconf\fR(3C), \fBprocess\fR(4), \fBproject\fR(4), \fBattributes\fR(5),
 163  157  \fBprivileges\fR(5)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX