sys_sched_getparam(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 a struct 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:

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