'\" t .\" Title: drain_workqueue .\" 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 "DRAIN_WORKQUEUE" "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" drain_workqueue \- drain a workqueue .SH "SYNOPSIS" .HP \w'void\ drain_workqueue('u .BI "void drain_workqueue(struct\ workqueue_struct\ *\ " "wq" ");" .SH "ARGUMENTS" .PP \fIwq\fR .RS 4 workqueue to drain .RE .SH "DESCRIPTION" .PP Wait until the workqueue becomes empty\&. While draining is in progress, only chain queueing is allowed\&. IOW, only currently pending or running work items on \fIwq\fR can queue further work items on it\&. \fIwq\fR is flushed repeatedly until it becomes empty\&. The number of flushing is determined by the depth of chaining and should be relatively short\&. Whine if it takes too long\&. .SH "COPYRIGHT" .br