__scx_init_task(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __scx_init_task(9) β€” Kernel API Manual πŸ’–

okay so welcome to the Kernel API Manual corner of the group chat, bestie. Today’s main character is __scx_init_task(9) β€” the function that initializes a task for a sched. We’re covering every single arg and every reference, because we do not skip details in this house. πŸ’…

✨ NAME ✨

__scx_init_task β€” Initialize a task for a sched. That’s the name, that’s the vibe, and honestly it’s kind of iconic. πŸŽ€

🌸 SYNOPSIS 🌸

int __scx_init_task (struct scx_sched *sch , struct task_struct *p ,
       struct cgroup *cgrp , bool fork );

πŸ¦‹ ARGUMENTS πŸ¦‹

Here are the four little besties you hand over:

  • sch β€” the sched you’re initializing p for.
  • p β€” the task of interest, aka the one we’re looking at.
  • cgrp β€” the cgroup that p is joining; NULL means p’s current task_group’s cgroup.
  • fork β€” true if p is being forked.

πŸ’œ DESCRIPTION πŸ’œ

Pre-commit cgroup migration passes cgrp explicitly as p’s task_group still reflects the source. That’s the plot twist, iykyk. 🫢

Return 0 on success, -errno on failure. So success is the 0 slay, and failure is your -errno moment. 😭

🌈 SEE ALSO 🌈

Here’s the entire squad, with zero skips. The kernel file is ./kernel/sched/ext/ext.c, and then all of these references are right here:


mwah πŸ’‹ this page comes from source/version ./kernel/sched/ext, dated October 2026, and the footer energy is still __scx_init_task(9). periodt. πŸ‘‘

πŸ“¦ where this page comes from