task_work_cancel(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… task_work_cancel(9) πŸ’…

okay bestie, welcome to the task_work_cancel(9) page from the Kernel API Manual β€” this is the one where we yank a queued callback off a task's queue. no cap, it's giving very "clean up your own mess" energy ✨


πŸ¦‹ NAME πŸ¦‹

task_work_cancel β€” cancel a pending work added by task_work_add() πŸ’–


✨ SYNOPSIS ✨

bool task_work_cancel (struct task_struct *task , struct callback_head
*cb );

πŸ’… ARGUMENTS πŸ’…

  • task β€” the task which should execute the work πŸ‘‘
  • cb β€” the callback to remove if queued πŸŽ€

🌸 DESCRIPTION 🌸

Remove a callback from a task's queue if queued. lowkey simple, highkey useful β€” that's the whole vibe 🫢


πŸŽ€ RETURN πŸŽ€

Returns true if the callback was queued and got cancelled, and false otherwise. literally yes-or-no, no in-between πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./kernel/task_work.c plus these iconic functions:


with love from your local kernel bestie πŸ’œ this page comes from ./kernel and is dated October 2026 πŸŒˆπŸŽ€βœ¨

πŸ“¦ where this page comes from