Print this page
10067 Miscellaneous man page typos
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Volker A. Brandt <vab@bb-c.de>


  48 .SH NAME
  49 pthread_getschedparam, pthread_setschedparam \- access dynamic thread
  50 scheduling parameters
  51 .SH SYNOPSIS
  52 .LP
  53 .nf
  54 cc -mt [ \fIflag\fR... ] \fIfile\fR... -lpthread [ \fIlibrary\fR... ]
  55 #include <pthread.h>
  56 
  57 \fBint\fR \fBpthread_getschedparam\fR(\fBpthread_t\fR \fIthread\fR, \fBint *restrict\fR \fIpolicy\fR,
  58      \fBstruct sched_param *restrict\fR \fIparam\fR);
  59 .fi
  60 
  61 .LP
  62 .nf
  63 \fBint\fR \fBpthread_setschedparam\fR(\fBpthread_t\fR \fIthread\fR, \fBint\fR \fIpolicy\fR,
  64      \fBconst struct sched_param *\fR\fIparam\fR);
  65 .fi
  66 
  67 .SH DESCRIPTION
  68 .sp
  69 .LP
  70 The \fBpthread_getschedparam()\fR and \fBpthread_setschedparam()\fR functions
  71 allow the scheduling policy and scheduling parameters of individual threads
  72 within a multithreaded process to be retrieved and set. Supported policies are
  73 :
  74 .sp
  75 .ne 2
  76 .na
  77 \fB\fBSCHED_OTHER\fR\fR
  78 .ad
  79 .RS 15n
  80 traditional time-sharing scheduling class
  81 .RE
  82 
  83 .sp
  84 .ne 2
  85 .na
  86 \fB\fBSCHED_FIFO\fR\fR
  87 .ad
  88 .RS 15n


 130 See \fBpthreads\fR(5). The affected scheduling parameter is the
 131 \fIsched_priority\fR member of the \fBsched_param\fR structure.
 132 .sp
 133 .LP
 134 The \fBpthread_getschedparam()\fR function retrieves the scheduling policy and
 135 scheduling parameters for the thread whose thread \fBID\fR is given by
 136 \fIthread\fR and stores those values in \fIpolicy\fR and \fIparam\fR,
 137 respectively. The priority value returned from \fBpthread_getschedparam()\fR is
 138 the value specified by the most recent \fBpthread_setschedparam()\fR or
 139 \fBpthread_create()\fR call affecting the target thread, and does not reflect
 140 any temporary adjustments to its priority as a result of any priority
 141 inheritance or ceiling functions. The \fBpthread_setschedparam()\fR function
 142 sets the scheduling policy and associated scheduling parameters for the thread
 143 whose thread  \fBID\fR is given by \fIthread\fR to the policy and associated
 144 parameters provided in \fIpolicy\fR and \fIparam\fR, respectively.
 145 .sp
 146 .LP
 147 If the \fBpthread_setschedparam()\fR function fails, no scheduling parameters
 148 will be changed  for the target thread.
 149 .SH RETURN VALUES
 150 .sp
 151 .LP
 152 If successful, the \fBpthread_getschedparam()\fR and
 153 \fBpthread_setschedparam()\fR functions return  \fB0\fR. Otherwise, an error
 154 number is returned to indicate the error.
 155 .SH ERRORS
 156 .sp
 157 .LP
 158 The \fBpthread_getschedparam()\fR and \fBpthread_gsetschedparam()\fR functions
 159 will fail if:
 160 .sp
 161 .ne 2
 162 .na
 163 \fB\fBESRCH\fR\fR
 164 .ad
 165 .RS 9n
 166 The value specified by \fIthread\fR does not refer to an existing thread.
 167 .RE
 168 
 169 .sp
 170 .LP
 171 The \fBpthread_setschedparam()\fR function will fail if:
 172 .sp
 173 .ne 2
 174 .na
 175 \fB\fBEINVAL\fR\fR
 176 .ad
 177 .RS 10n
 178 The value specified by \fIpolicy\fR or one of the scheduling parameters
 179 associated with the scheduling policy \fIpolicy\fR is invalid.
 180 .RE
 181 
 182 .sp
 183 .ne 2
 184 .na
 185 \fB\fBEPERM\fR\fR
 186 .ad
 187 .RS 10n
 188 The caller does not have the appropriate permission to set either the
 189 scheduling parameters or the scheduling policy of the specified thread.
 190 .RE
 191 
 192 .SH ATTRIBUTES
 193 .sp
 194 .LP
 195 See \fBattributes\fR(5) for descriptions of the following attributes:
 196 .sp
 197 
 198 .sp
 199 .TS
 200 box;
 201 c | c
 202 l | l .
 203 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 204 _
 205 Interface Stability     Committed
 206 _
 207 MT-Level        MT-Safe
 208 _
 209 Standard        See \fBstandards\fR(5).
 210 .TE
 211 
 212 .SH SEE ALSO
 213 .sp
 214 .LP
 215 \fBpthread_attr_init\fR(3C), \fBsched_getparam\fR(3C),
 216 \fBsched_get_priority_max\fR(3C), \fBsched_get_priority_max\fR(3C),
 217 \fBsched_get_priority_min\fR(3C), \fBsched_setparam\fR(3C),
 218 \fBsched_getscheduler\fR(3C), \fBsched_setscheduler\fR(3C),
 219 \fBattributes\fR(5), \fBpthreads\fR(5), \fBstandards\fR(5)


  48 .SH NAME
  49 pthread_getschedparam, pthread_setschedparam \- access dynamic thread
  50 scheduling parameters
  51 .SH SYNOPSIS
  52 .LP
  53 .nf
  54 cc -mt [ \fIflag\fR... ] \fIfile\fR... -lpthread [ \fIlibrary\fR... ]
  55 #include <pthread.h>
  56 
  57 \fBint\fR \fBpthread_getschedparam\fR(\fBpthread_t\fR \fIthread\fR, \fBint *restrict\fR \fIpolicy\fR,
  58      \fBstruct sched_param *restrict\fR \fIparam\fR);
  59 .fi
  60 
  61 .LP
  62 .nf
  63 \fBint\fR \fBpthread_setschedparam\fR(\fBpthread_t\fR \fIthread\fR, \fBint\fR \fIpolicy\fR,
  64      \fBconst struct sched_param *\fR\fIparam\fR);
  65 .fi
  66 
  67 .SH DESCRIPTION

  68 .LP
  69 The \fBpthread_getschedparam()\fR and \fBpthread_setschedparam()\fR functions
  70 allow the scheduling policy and scheduling parameters of individual threads
  71 within a multithreaded process to be retrieved and set. Supported policies are
  72 :
  73 .sp
  74 .ne 2
  75 .na
  76 \fB\fBSCHED_OTHER\fR\fR
  77 .ad
  78 .RS 15n
  79 traditional time-sharing scheduling class
  80 .RE
  81 
  82 .sp
  83 .ne 2
  84 .na
  85 \fB\fBSCHED_FIFO\fR\fR
  86 .ad
  87 .RS 15n


 129 See \fBpthreads\fR(5). The affected scheduling parameter is the
 130 \fIsched_priority\fR member of the \fBsched_param\fR structure.
 131 .sp
 132 .LP
 133 The \fBpthread_getschedparam()\fR function retrieves the scheduling policy and
 134 scheduling parameters for the thread whose thread \fBID\fR is given by
 135 \fIthread\fR and stores those values in \fIpolicy\fR and \fIparam\fR,
 136 respectively. The priority value returned from \fBpthread_getschedparam()\fR is
 137 the value specified by the most recent \fBpthread_setschedparam()\fR or
 138 \fBpthread_create()\fR call affecting the target thread, and does not reflect
 139 any temporary adjustments to its priority as a result of any priority
 140 inheritance or ceiling functions. The \fBpthread_setschedparam()\fR function
 141 sets the scheduling policy and associated scheduling parameters for the thread
 142 whose thread  \fBID\fR is given by \fIthread\fR to the policy and associated
 143 parameters provided in \fIpolicy\fR and \fIparam\fR, respectively.
 144 .sp
 145 .LP
 146 If the \fBpthread_setschedparam()\fR function fails, no scheduling parameters
 147 will be changed  for the target thread.
 148 .SH RETURN VALUES

 149 .LP
 150 If successful, the \fBpthread_getschedparam()\fR and
 151 \fBpthread_setschedparam()\fR functions return  \fB0\fR. Otherwise, an error
 152 number is returned to indicate the error.
 153 .SH ERRORS

 154 .LP
 155 The \fBpthread_getschedparam()\fR and \fBpthread_setschedparam()\fR functions
 156 will fail if:
 157 .sp
 158 .ne 2
 159 .na
 160 \fB\fBESRCH\fR\fR
 161 .ad
 162 .RS 9n
 163 The value specified by \fIthread\fR does not refer to an existing thread.
 164 .RE
 165 
 166 .sp
 167 .LP
 168 The \fBpthread_setschedparam()\fR function will fail if:
 169 .sp
 170 .ne 2
 171 .na
 172 \fB\fBEINVAL\fR\fR
 173 .ad
 174 .RS 10n
 175 The value specified by \fIpolicy\fR or one of the scheduling parameters
 176 associated with the scheduling policy \fIpolicy\fR is invalid.
 177 .RE
 178 
 179 .sp
 180 .ne 2
 181 .na
 182 \fB\fBEPERM\fR\fR
 183 .ad
 184 .RS 10n
 185 The caller does not have the appropriate permission to set either the
 186 scheduling parameters or the scheduling policy of the specified thread.
 187 .RE
 188 
 189 .SH ATTRIBUTES

 190 .LP
 191 See \fBattributes\fR(5) for descriptions of the following attributes:
 192 .sp
 193 
 194 .sp
 195 .TS
 196 box;
 197 c | c
 198 l | l .
 199 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 200 _
 201 Interface Stability     Committed
 202 _
 203 MT-Level        MT-Safe
 204 _
 205 Standard        See \fBstandards\fR(5).
 206 .TE
 207 
 208 .SH SEE ALSO

 209 .LP
 210 \fBpthread_attr_init\fR(3C), \fBsched_getparam\fR(3C),
 211 \fBsched_get_priority_max\fR(3C), \fBsched_get_priority_max\fR(3C),
 212 \fBsched_get_priority_min\fR(3C), \fBsched_setparam\fR(3C),
 213 \fBsched_getscheduler\fR(3C), \fBsched_setscheduler\fR(3C),
 214 \fBattributes\fR(5), \fBpthreads\fR(5), \fBstandards\fR(5)