1CANCEL_WORK_SYNC(9)              Driver Basics             CANCEL_WORK_SYNC(9)
2
3
4

NAME

6       cancel_work_sync - cancel a work and wait for it to finish
7

SYNOPSIS

9       bool cancel_work_sync(struct work_struct * work);
10

ARGUMENTS

12       work
13           the work to cancel
14

DESCRIPTION

16       Cancel work and wait for its execution to finish. This function can be
17       used even if the work re-queues itself or migrates to another
18       workqueue. On return from this function, work is guaranteed to be not
19       pending or executing on any CPU.
20
21       cancel_work_sync(delayed_work->work) must not be used for
22       delayed_work's. Use cancel_delayed_work_sync instead.
23
24       The caller must ensure that the workqueue on which work was last queued
25       can't be destroyed before this function returns.
26

RETURNS

28       true if work was pending, false otherwise.
29
31Kernel Hackers Manual 3.10         June 2019               CANCEL_WORK_SYNC(9)
Impressum