task_work_cancel_match(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay bestie, welcome to the task_work_cancel_match(9) page from the Kernel API Manual. This one is literally about canceling a pending work that was added by task_work_add() β€” no cap, that's the whole vibe. πŸ’…

✨ NAME ✨

task_work_cancel_match β€” cancel a pending work added by task_work_add() 🫢

πŸ¦‹ SYNOPSIS πŸ¦‹

Here’s the exact signature, bestie β€” do not freestyle it:

       struct callback_head * task_work_cancel_match (struct task_struct *task
       , bool (*match)(struct callback_head *, void *data) , void *data );

πŸ’… ARGUMENTS πŸ’…

Three little args, all iconic:

  • task β€” the task which should execute the work. Type: struct task_struct *.
  • match β€” match function to call. Type: bool (*match)(struct callback_head *, void *data).
  • data β€” data to be passed in to match function. Type: void *.

πŸŽ€ RETURN πŸŽ€

Return type: struct callback_head *.

The found work or NULL if not found. That’s it β€” found work or NULL, no secret third option. πŸ’–

🌈 SEE ALSO 🌈

Kernel file ./kernel/task_work.c β€” plus these besties: task_work_add(9), task_work_cancel_func(9), task_work_cancel(9), task_work_run(9). Go read them, iykyk. 🌈

Catch u later, bestie! πŸ’– This page’s source/version is ./kernel, dated October 2026, and it’s literally the task_work_cancel_match(9) page β€” periodt. πŸ’…

πŸ“¦ where this page comes from