sys_sched_setparam(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 sys_sched_setparam β€” like, the kernel API manual, bestie ✨

okay so real talk, this one lives in the Kernel API Manual section (9), so it's a kernel-internals girlie, not your everyday userland command. come sit with me πŸ’…


✨ NAME ✨

sys_sched_setparam β€” set/change the RT priority of a thread πŸŽ€

like. it literally does what it says on the tin. RT priority goes in, RT priority gets set/changed. iconic.


πŸ¦‹ SYNOPSIS πŸ¦‹

long sys_sched_setparam (pid_t pid , struct sched_param __user * param );

that's the whole signature, no cap. one pid_t, one struct sched_param __user *, and it hands you back a long. 🫢


🌸 ARGUMENTS 🌸

  • pid β€” the pid in question. yes, that pid. the one you're asking about. πŸ‘€
  • param β€” structure containing the new RT priority. that's your struct sched_param __user *, and it's the whole point of the whole function fr fr πŸ’–

🌈 RETURN 🌈

  • 0 on success ✨ slay
  • An error code otherwise 😭 (not zero? something went sideways, bestie)

πŸ‘‘ SEE ALSO πŸ‘‘

first up, the kernel file it hangs out in: ./kernel/sched/syscalls.c β€” that's home base 🏠

and then the whole friend group, no one left out:

that's the entire group chat, periodt πŸ’€


ngl if you're the kind of person who reads scheduling syscalls for fun, you're giving main character energy and i'm obsessed 🧚

and that's the vibe check, bestie β€” this page is sourced from ./kernel/sched and dated October 2026, so if you're reading it in the future, hi, hope the scheduler's treating you well πŸ’œπŸ«ΆπŸŒΈ

πŸ“¦ where this page comes from