sys_sched_getparam(9)
π sys_sched_getparam β a Kernel API Manual moment π
okay so bestie, welcome to sys_sched_getparam(9), the Kernel API Manual page you didn't know you needed. this one is short and sweet and honestly kind of iconic for it β¨
πΈ NAME πΈ
sys_sched_getparam β get the RT priority of a thread π§΅π
like, that's literally it. that's the whole job. no cap.
π¦ SYNOPSIS π¦
long sys_sched_getparam (pid_t pid , struct sched_param __user * param
);
look at that signature. it's giving "small function, big responsibility" π₯
π ARGUMENTS π
pidβ the pid in question. yeah. that one. the process you're curious about πparamβ structure containing the RT priority. it's astruct sched_param __user *, so it's pointing at user space, and that's where the priority is gonna land π«Ά
π RETURN π
On success, 0 and the RT priority is in param. Otherwise, an error code. that's the vibe check β zero means slay, anything else means something went sideways π
π SEE ALSO π
Kernel file ./kernel/sched/syscalls.c β the source, the origin story, the main character β¨
and then, honestly, the whole friend group:
task_prio(9)idle_cpu(9)idle_task(9)find_process_by_pid(9)sched_setscheduler(9)sched_setscheduler_nocheck(9)sys_sched_setscheduler(9)sys_sched_setparam(9)sys_sched_setattr(9)sys_sched_getscheduler(9)sys_sched_getattr(9)sys_sched_setaffinity(9)sys_sched_getaffinity(9)sys_sched_yield(9)yield(9)yield_to(9)sys_sched_get_priority_max(9)sys_sched_get_priority_min(9)sys_sched_rr_get_interval(9)
iykyk π go read them all, they're all linked, that's the point of a SEE ALSO, bestie π¦
mwah π this page lives in ./kernel/sched and it's dated October 2026 β that's the whole sign-off, take care, drink water, and remember: on success you get 0 and the priority is in param πβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms