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>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3c/pthread_getschedparam.3c
+++ new/usr/src/man/man3c/pthread_getschedparam.3c
1 1 .\"
2 2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 3 .\" permission to reproduce portions of its copyrighted documentation.
4 4 .\" Original documentation from The Open Group can be obtained online at
5 5 .\" http://www.opengroup.org/bookstore/.
6 6 .\"
7 7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 8 .\" Group, have given us permission to reprint portions of their
9 9 .\" documentation.
10 10 .\"
11 11 .\" In the following statement, the phrase ``this text'' refers to portions
12 12 .\" of the system documentation.
13 13 .\"
14 14 .\" Portions of this text are reprinted and reproduced in electronic form
15 15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 16 .\" Standard for Information Technology -- Portable Operating System
17 17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 19 .\" Engineers, Inc and The Open Group. In the event of any discrepancy
20 20 .\" between these versions and the original IEEE and The Open Group
21 21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 22 .\" document. The original Standard can be obtained online at
23 23 .\" http://www.opengroup.org/unix/online.html.
24 24 .\"
25 25 .\" This notice shall appear on any product containing this material.
26 26 .\"
27 27 .\" The contents of this file are subject to the terms of the
28 28 .\" Common Development and Distribution License (the "License").
29 29 .\" You may not use this file except in compliance with the License.
30 30 .\"
31 31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 32 .\" or http://www.opensolaris.org/os/licensing.
33 33 .\" See the License for the specific language governing permissions
34 34 .\" and limitations under the License.
35 35 .\"
36 36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 38 .\" If applicable, add the following below this CDDL HEADER, with the
39 39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
41 41 .\"
42 42 .\"
43 43 .\" Copyright 1991, 1992, 1994, The X/Open Company Ltd.
44 44 .\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved.
45 45 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
46 46 .\"
47 47 .TH PTHREAD_GETSCHEDPARAM 3C "Apr 1, 2008"
48 48 .SH NAME
49 49 pthread_getschedparam, pthread_setschedparam \- access dynamic thread
50 50 scheduling parameters
51 51 .SH SYNOPSIS
52 52 .LP
53 53 .nf
54 54 cc -mt [ \fIflag\fR... ] \fIfile\fR... -lpthread [ \fIlibrary\fR... ]
55 55 #include <pthread.h>
56 56
57 57 \fBint\fR \fBpthread_getschedparam\fR(\fBpthread_t\fR \fIthread\fR, \fBint *restrict\fR \fIpolicy\fR,
↓ open down ↓ |
57 lines elided |
↑ open up ↑ |
58 58 \fBstruct sched_param *restrict\fR \fIparam\fR);
59 59 .fi
60 60
61 61 .LP
62 62 .nf
63 63 \fBint\fR \fBpthread_setschedparam\fR(\fBpthread_t\fR \fIthread\fR, \fBint\fR \fIpolicy\fR,
64 64 \fBconst struct sched_param *\fR\fIparam\fR);
65 65 .fi
66 66
67 67 .SH DESCRIPTION
68 -.sp
69 68 .LP
70 69 The \fBpthread_getschedparam()\fR and \fBpthread_setschedparam()\fR functions
71 70 allow the scheduling policy and scheduling parameters of individual threads
72 71 within a multithreaded process to be retrieved and set. Supported policies are
73 72 :
74 73 .sp
75 74 .ne 2
76 75 .na
77 76 \fB\fBSCHED_OTHER\fR\fR
78 77 .ad
79 78 .RS 15n
80 79 traditional time-sharing scheduling class
81 80 .RE
82 81
83 82 .sp
84 83 .ne 2
85 84 .na
86 85 \fB\fBSCHED_FIFO\fR\fR
87 86 .ad
88 87 .RS 15n
89 88 real-time class: run to completion
90 89 .RE
91 90
92 91 .sp
93 92 .ne 2
94 93 .na
95 94 \fB\fBSCHED_RR\fR\fR
96 95 .ad
97 96 .RS 15n
98 97 real-time class: round-robin
99 98 .RE
100 99
101 100 .sp
102 101 .ne 2
103 102 .na
104 103 \fB\fBSCHED_IA\fR\fR
105 104 .ad
106 105 .RS 15n
107 106 interactive time-sharing class
108 107 .RE
109 108
110 109 .sp
111 110 .ne 2
112 111 .na
113 112 \fB\fBSCHED_FSS\fR\fR
114 113 .ad
115 114 .RS 15n
116 115 fair-share scheduling class
117 116 .RE
118 117
119 118 .sp
120 119 .ne 2
121 120 .na
122 121 \fB\fBSCHED_FX\fR\fR
123 122 .ad
124 123 .RS 15n
125 124 fixed priority scheduling class
126 125 .RE
127 126
128 127 .sp
129 128 .LP
130 129 See \fBpthreads\fR(5). The affected scheduling parameter is the
131 130 \fIsched_priority\fR member of the \fBsched_param\fR structure.
132 131 .sp
133 132 .LP
134 133 The \fBpthread_getschedparam()\fR function retrieves the scheduling policy and
135 134 scheduling parameters for the thread whose thread \fBID\fR is given by
136 135 \fIthread\fR and stores those values in \fIpolicy\fR and \fIparam\fR,
137 136 respectively. The priority value returned from \fBpthread_getschedparam()\fR is
138 137 the value specified by the most recent \fBpthread_setschedparam()\fR or
139 138 \fBpthread_create()\fR call affecting the target thread, and does not reflect
↓ open down ↓ |
61 lines elided |
↑ open up ↑ |
140 139 any temporary adjustments to its priority as a result of any priority
141 140 inheritance or ceiling functions. The \fBpthread_setschedparam()\fR function
142 141 sets the scheduling policy and associated scheduling parameters for the thread
143 142 whose thread \fBID\fR is given by \fIthread\fR to the policy and associated
144 143 parameters provided in \fIpolicy\fR and \fIparam\fR, respectively.
145 144 .sp
146 145 .LP
147 146 If the \fBpthread_setschedparam()\fR function fails, no scheduling parameters
148 147 will be changed for the target thread.
149 148 .SH RETURN VALUES
150 -.sp
151 149 .LP
152 150 If successful, the \fBpthread_getschedparam()\fR and
153 151 \fBpthread_setschedparam()\fR functions return \fB0\fR. Otherwise, an error
154 152 number is returned to indicate the error.
155 153 .SH ERRORS
156 -.sp
157 154 .LP
158 -The \fBpthread_getschedparam()\fR and \fBpthread_gsetschedparam()\fR functions
155 +The \fBpthread_getschedparam()\fR and \fBpthread_setschedparam()\fR functions
159 156 will fail if:
160 157 .sp
161 158 .ne 2
162 159 .na
163 160 \fB\fBESRCH\fR\fR
164 161 .ad
165 162 .RS 9n
166 163 The value specified by \fIthread\fR does not refer to an existing thread.
167 164 .RE
168 165
169 166 .sp
170 167 .LP
171 168 The \fBpthread_setschedparam()\fR function will fail if:
172 169 .sp
173 170 .ne 2
174 171 .na
175 172 \fB\fBEINVAL\fR\fR
176 173 .ad
177 174 .RS 10n
178 175 The value specified by \fIpolicy\fR or one of the scheduling parameters
179 176 associated with the scheduling policy \fIpolicy\fR is invalid.
180 177 .RE
181 178
182 179 .sp
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
183 180 .ne 2
184 181 .na
185 182 \fB\fBEPERM\fR\fR
186 183 .ad
187 184 .RS 10n
188 185 The caller does not have the appropriate permission to set either the
189 186 scheduling parameters or the scheduling policy of the specified thread.
190 187 .RE
191 188
192 189 .SH ATTRIBUTES
193 -.sp
194 190 .LP
195 191 See \fBattributes\fR(5) for descriptions of the following attributes:
196 192 .sp
197 193
198 194 .sp
199 195 .TS
200 196 box;
201 197 c | c
202 198 l | l .
203 199 ATTRIBUTE TYPE ATTRIBUTE VALUE
204 200 _
205 201 Interface Stability Committed
206 202 _
207 203 MT-Level MT-Safe
208 204 _
209 205 Standard See \fBstandards\fR(5).
210 206 .TE
211 207
212 208 .SH SEE ALSO
213 -.sp
214 209 .LP
215 210 \fBpthread_attr_init\fR(3C), \fBsched_getparam\fR(3C),
216 211 \fBsched_get_priority_max\fR(3C), \fBsched_get_priority_max\fR(3C),
217 212 \fBsched_get_priority_min\fR(3C), \fBsched_setparam\fR(3C),
218 213 \fBsched_getscheduler\fR(3C), \fBsched_setscheduler\fR(3C),
219 214 \fBattributes\fR(5), \fBpthreads\fR(5), \fBstandards\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX