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

NAME

6       cancel_work_sync - block until a work_struct´s callback has terminated
7

SYNOPSIS

9       int cancel_work_sync(struct work_struct * work);
10

ARGUMENTS

12       work
13           the work which is to be flushed
14

DESCRIPTION

16       Returns true if work was pending.
17
18       cancel_work_sync will cancel the work if it is queued. If the work´s
19       callback appears to be running, cancel_work_sync will block until it
20       has completed.
21
22       It is possible to use this function if the work re-queues itself. It
23       can cancel the work even if it migrates to another workqueue, however
24       in that case it only guarantees that work->func has completed on the
25       last queued workqueue.
26
27       cancel_work_sync(delayed_work->work) should be used only if ->timer is
28       not pending, otherwise it goes into a busy-wait loop until the timer
29       expires.
30
31       The caller must ensure that workqueue_struct on which this work was
32       last queued can´t be destroyed before this function returns.
33
35Kernel Hackers Manual 2.6.         June 2019               CANCEL_WORK_SYNC(9)
Impressum