sched_setparam(2) System Calls Manual sched_setparam(2) sched_setparam, sched_getparam - LIBRARY Standard C library (libc, -lc) #include int sched_setparam(pid_t pid, const struct sched_param *param); int sched_getparam(pid_t pid, struct sched_param *param); struct sched_param { ... int sched_priority; ... }; sched_setparam() , , pid. pid , . param , pid. , Linux, sched(7). sched_getparam() pid. pid , . sched_setparam() param . param->sched_priority sched_get_priority_min(2) sched_get_priority_max(2). , , sched(7). POSIX-, sched_setparam() sched_getparam(), _POSIX_PRIORITY_SCHEDULING. On success, sched_setparam() and sched_getparam() return 0. On error, -1 is returned, and errno is set to indicate the error. EINVAL : pid param NULL EINVAL (sched_setparam()) param . EPERM (sched_setparam()) (Linux: CAP_SYS_NICE). ESRCH pid . POSIX.1-2008. POSIX.1-2001. . getpriority(2), gettid(2), nice(2), sched_get_priority_max(2), sched_get_priority_min(2), sched_getaffinity(2), sched_getscheduler(2), sched_setaffinity(2), sched_setattr(2), sched_setscheduler(2), setpriority(2), capabilities(7), sched(7) Alexander Golubev , Azamat Hackimov , Hotellook, Nikita , Spiros Georgaras , Vladislav , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . sched_setparam(2)