kthread_stop_put(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… kthread_stop_put(9) πŸ’…

okay bestie, welcome to the Kernel API Manual, section 9, where we talk about kthread_stop_put. this one's a little two-for-one deal and honestly? kind of iconic of it.


✨ NAME ✨

kthread_stop_put β€” stop a thread and put its task struct. two jobs, one function, main character energy fr fr.


πŸŽ€ SYNOPSIS πŸŽ€

int kthread_stop_put (struct task_struct *k );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • k β€” a thread created by kthread_create. that's the one we're stopping, bestie. it has to be that kind of thread, no substitutions 🫢

🌸 DESCRIPTION 🌸

so what this does is: it stops a thread created by kthread_create, and then it puts its task_struct. stop + put, like the name literally says. the way that the function name is just the description 😭 slay.

⚠️ but listen β€” only use this when you're holding an extra task struct reference that you got by calling get_task_struct. it says "only," and it means only. no cap. if you didn't get that reference, this is not your function, bestie, put it down πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./kernel/kthread.c β€” the whole friend group lives there 🧚

like, the entire kthread family reunion is right there πŸ‘‘ go say hi.


⭐ the sign-off ⭐

this whole page comes from ./kernel, dated October 2026, and it's kthread_stop_put(9) β€” that's the version tag, bestie, we're not making it up πŸ’–

anyway. get that get_task_struct reference first, then come back. mwah! πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from