'\" t .\" Title: cancel_work_sync .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "CANCEL_WORK_SYNC" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Driver Basics" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" cancel_work_sync \- cancel a work and wait for it to finish .SH "SYNOPSIS" .HP \w'bool\ cancel_work_sync('u .BI "bool cancel_work_sync(struct\ work_struct\ *\ " "work" ");" .SH "ARGUMENTS" .PP \fIwork\fR .RS 4 the work to cancel .RE .SH "DESCRIPTION" .PP Cancel \fIwork\fR and wait for its execution to finish\&. This function can be used even if the work re\-queues itself or migrates to another workqueue\&. On return from this function, \fIwork\fR is guaranteed to be not pending or executing on any CPU\&. .PP cancel_work_sync(delayed_work\->work) must not be used for delayed_work\*(Aqs\&. Use \fBcancel_delayed_work_sync\fR instead\&. .PP The caller must ensure that the workqueue on which \fIwork\fR was last queued can\*(Aqt be destroyed before this function returns\&. .SH "RETURN" .PP \fBtrue\fR if \fIwork\fR was pending, \fBfalse\fR otherwise\&. .SH "COPYRIGHT" .br