'\" t .\" Title: kthread_park .\" 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 "KTHREAD_PARK" "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" kthread_park \- park a thread created by \fBkthread_create\fR\&. .SH "SYNOPSIS" .HP \w'int\ kthread_park('u .BI "int kthread_park(struct\ task_struct\ *\ " "k" ");" .SH "ARGUMENTS" .PP \fIk\fR .RS 4 thread created by \fBkthread_create\fR\&. .RE .SH "DESCRIPTION" .PP Sets \fBkthread_should_park\fR for \fIk\fR to return true, wakes it, and waits for it to return\&. This can also be called after \fBkthread_create\fR instead of calling \fBwake_up_process\fR: the thread will park without calling \fBthreadfn\fR\&. .PP Returns 0 if the thread is parked, \-ENOSYS if the thread exited\&. If called by the kthread itself just the park bit is set\&. .SH "COPYRIGHT" .br