diff --git a/man2/sched_setscheduler.2 b/man2/sched_setscheduler.2 index 5fef9a3ea..51e651030 100644 --- a/man2/sched_setscheduler.2 +++ b/man2/sched_setscheduler.2 @@ -453,6 +453,29 @@ and details vary across systems. For example, the Solaris 7 manual page says that the real or effective user ID of the calling process must match the real user ID or the save set-user-ID of the target process. + +.PP +The scheduling policy and parameters are in fact per-thread +attributes on Linux. +The value returned from a call to +.BR gettid (2) +can be passed in the argument +.IR pid . +Specifying +.I pid +as 0 will operate on the attribute for the calling thread, +and passing the value returned from a call to +.BR getpid (2) +will operate on the attribute for the main thread of the thread group. +(If you are using the POSIX threads API, then use +.BR pthread_setschedparam (3), +.BR pthread_getschedparam (3), +and +.BR pthread_setschedprio (3), +instead of the +.BR sched_* (2) +system calls.) + .PP Originally, Standard Linux was intended as a general-purpose operating system being able to handle background processes, interactive