schedule_tail(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… schedule_tail(9) β€” from the Kernel API Manual, bestie

okay so real talk: this is a page from the Kernel API Manual (section 9, kernel developer land ✨), and honestly it's short but it is load-bearing. no cap.


🌸 NAME 🌸

schedule_tail β€” literally the first thing a freshly forked thread has to call. like, before it does anything else. main character energy for real πŸ’…


✨ SYNOPSIS ✨

__visible void schedule_tail (struct task_struct *prev );

yes that's the whole vibe. __visible void, returns nothing, takes one pointer. iconic.


πŸŽ€ ARGUMENTS πŸŽ€

  • prev β€” the thread we just switched away from. that's it, that's the whole arg. keep it close, bestie 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

so the source lives in the kernel file ./kernel/sched/core.c, and here's the whole friend group β€” go say hi:


ok tiny reminder since this is a kernel page and we respect the kernel: this is the first call a freshly forked thread makes. not the second, not the "whenever I feel like it" call. the first. πŸ’€

and that's the page!! 🌈 mwah πŸ’– this one came from ./kernel/sched, dated October 2026, and it's schedule_tail(9) β€” slay, go finish your task switch, bestie πŸ§šβ€β™€οΈπŸ‘‘

πŸ“¦ where this page comes from