yield_to(9)

yield_to9

Yield the current processor to another thread in your thread group, or accelerate that thread toward the processor it's on.

Usage

int __sched yield_to(struct task_struct * p, bool preempt);

Arguments

p

target task

preempt

whether task preemption is allowed or not

Overview

It's the caller's job to ensure that the target task struct can't go away on us before we can do any checks.

Return

true (>0) if we indeed boosted the target task. false (0) if we failed to boost the target. -ESRCH if there's no task to yield to.

Releases

2 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7
  2. 8

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.