'\" t .\" Title: wait_task_stopped .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "WAIT_TASK_STOPPED" "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" wait_task_stopped \- Wait for \fBTASK_STOPPED\fR or \fBTASK_TRACED\fR .SH "SYNOPSIS" .HP \w'int\ wait_task_stopped('u .BI "int wait_task_stopped(struct\ wait_opts\ *\ " "wo" ", int\ " "ptrace" ", struct\ task_struct\ *\ " "p" ");" .SH "ARGUMENTS" .PP \fIwo\fR .RS 4 wait options .RE .PP \fIptrace\fR .RS 4 is the wait for ptrace .RE .PP \fIp\fR .RS 4 task to wait for .RE .SH "DESCRIPTION" .PP Handle \fBsys_wait4\fR work for \fBp\fR in state \fBTASK_STOPPED\fR or \fBTASK_TRACED\fR\&. .SH "CONTEXT" .PP read_lock(tasklist_lock), which is released if return value is non\-zero\&. Also, grabs and releases \fIp\fR\->sighand\->siglock\&. .SH "RETURN" .PP 0 if wait condition didn\*(Aqt exist and search for other wait conditions should continue\&. Non\-zero return, \-errno on failure and \fIp\fR\*(Aqs pid on success, implies that tasklist_lock is released and wait condition search should terminate\&. .SH "COPYRIGHT" .br