'\" t .\" Title: yield_to .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "YIELD_TO" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "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" yield_to \- yield the current processor to another thread in your thread group, or accelerate that thread toward the processor it\*(Aqs on\&. .SH "SYNOPSIS" .HP \w'int\ __sched\ yield_to('u .BI "int __sched yield_to(struct\ task_struct\ *\ " "p" ", bool\ " "preempt" ");" .SH "ARGUMENTS" .PP \fIp\fR .RS 4 target task .RE .PP \fIpreempt\fR .RS 4 whether task preemption is allowed or not .RE .SH "DESCRIPTION" .PP It\*(Aqs the caller\*(Aqs job to ensure that the target task struct can\*(Aqt go away on us before we can do any checks\&. .SH "RETURN" .PP true (>0) if we indeed boosted the target task\&. false (0) if we failed to boost the target\&. \-ESRCH if there\*(Aqs no task to yield to\&. .SH "COPYRIGHT" .br