diff --git a/man7/sched.7 b/man7/sched.7 index ea865b1d5..198e267b7 100644 --- a/man7/sched.7 +++ b/man7/sched.7 @@ -165,18 +165,38 @@ blocked again. When a blocked \fBSCHED_FIFO\fP thread becomes runnable, it will be inserted at the end of the list for its priority. .IP 3) -A call to +If a call to .BR sched_setscheduler (2), .BR sched_setparam (2), +.BR sched_setattr (2), +.BR pthread_setschedparam (3), or -.BR sched_setattr (2) -will put the -\fBSCHED_FIFO\fP thread identified by -\fIpid\fP at the start of the list if it was runnable. -As a consequence, it may preempt the currently running thread if -it has the same priority. -(POSIX.1 specifies that the thread should go to the end -of the list.) +.BR pthread_setschedprio (3) +changes the priority of the running or runnable +.B SCHED_FIFO +thread identified by +.I pid +the effect on the thread's position in the list depends on +the direction of the change to threads priority: +.RS +.IP \(bu 3 +If the thread's priority is raised, +it is placed at the end of the list for its new priority. +As a consequence, +it may preempt a currently running thread with the same priority. +.IP \(bu +If the thread's priority is unchanged, +its position in the run list is unchanged. +.IP \(bu +If the thread's priority is lowered, +it is placed at the front of the list for its new priority. +.RE +.IP +According to POSIX.1-2008, +changes to a thread's priority (or policy) using any mechanism other than +.BR pthread_setschedprio (3) +should result in the thread being placed at the end of +the list for its priority. .\" In 2.2.x and 2.4.x, the thread is placed at the front of the queue .\" In 2.0.x, the Right Thing happened: the thread went to the back -- MTK .IP 4)