cancel_delayed_work(9)

cancel_delayed_work9

Cancel a delayed work

Usage

bool cancel_delayed_work(struct delayed_work * dwork);

Arguments

dwork

delayed_work to cancel

Overview

Kill off a pending delayed_work.

Return

true if dwork was pending and canceled; false if it wasn't pending.

Note

The work callback function may still be running on return, unless it returns true and the work doesn't re-arm itself. Explicitly flush or use cancel_delayed_work_sync to wait on it.

This function is safe to call from any context including IRQ handler.

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.