17
!pthread_setschedparam! sets the scheduling parameters for the thread
18
|target_thread| as indicated by |policy| and |param|. |policy| can be
19
either !SCHED_OTHER! (regular, non-realtime scheduling), !SCHED_RR!
20
(realtime, round-robin) or !SCHED_FIFO! (realtime, first-in
21
first-out). |param| specifies the scheduling priority for the two
22
realtime policies. See !sched_setpolicy!(2) for more information on
17
\fBpthread_setschedparam\fP sets the scheduling parameters for the thread
18
\fItarget_thread\fP as indicated by \fIpolicy\fP and \fIparam\fP. \fIpolicy\fP can be
19
either \fBSCHED_OTHER\fP (regular, non-realtime scheduling), \fBSCHED_RR\fP
20
(realtime, round-robin) or \fBSCHED_FIFO\fP (realtime, first-in
21
first-out). \fIparam\fP specifies the scheduling priority for the two
22
realtime policies. See \fBsched_setpolicy\fP(2) for more information on
23
23
scheduling policies.
25
The realtime scheduling policies !SCHED_RR! and !SCHED_FIFO! are
25
The realtime scheduling policies \fBSCHED_RR\fP and \fBSCHED_FIFO\fP are
26
26
available only to processes with superuser privileges.
28
!pthread_getschedparam! retrieves the scheduling policy and scheduling
29
parameters for the thread |target_thread| and store them in the
30
locations pointed to by |policy| and |param|, respectively.
28
\fBpthread_getschedparam\fP retrieves the scheduling policy and scheduling
29
parameters for the thread \fItarget_thread\fP and store them in the
30
locations pointed to by \fIpolicy\fP and \fIparam\fP, respectively.
33
!pthread_setschedparam! and !pthread_getschedparam! return 0 on
33
\fBpthread_setschedparam\fP and \fBpthread_getschedparam\fP return 0 on
34
34
success and a non-zero error code on error.
37
On error, !pthread_setschedparam! returns the following error codes:
37
On error, \fBpthread_setschedparam\fP returns the following error codes:
41
|policy| is not one of !SCHED_OTHER!, !SCHED_RR!, !SCHED_FIFO!
45
the priority value specified by |param| is not valid for the specified policy
41
\fIpolicy\fP is not one of \fBSCHED_OTHER\fP, \fBSCHED_RR\fP, \fBSCHED_FIFO\fP
45
the priority value specified by \fIparam\fP is not valid for the specified policy
49
49
the calling process does not have superuser permissions
53
the |target_thread| is invalid or has already terminated
53
the \fItarget_thread\fP is invalid or has already terminated
57
|param| points outside the process memory space
57
\fIparam\fP points outside the process memory space
60
On error, !pthread_getschedparam! returns the following error codes:
60
On error, \fBpthread_getschedparam\fP returns the following error codes:
64
the |target_thread| is invalid or has already terminated
64
the \fItarget_thread\fP is invalid or has already terminated
68
|policy| or |param| point outside the process memory space
68
\fIpolicy\fP or \fIparam\fP point outside the process memory space
72
72
Xavier Leroy <Xavier.Leroy@inria.fr>
75
!sched_setscheduler!(2),
76
!sched_getscheduler!(2),
78
!pthread_attr_setschedpolicy!(3),
79
!pthread_attr_setschedparam!(3).
75
\fBsched_setscheduler\fP(2),
76
\fBsched_getscheduler\fP(2),
77
\fBsched_getparam\fP(2),
78
\fBpthread_attr_setschedpolicy\fP(3),
79
\fBpthread_attr_setschedparam\fP(3).