---
name: "yield"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/yield/9"
---

# yield(9)

yield the current processor to other threads.

## NAME

yield - yield the current processor to other threads.

## SYNOPSIS

**void \_\_sched yield(***void***);**

## ARGUMENTS

*void*

no arguments

## DESCRIPTION

Do not ever use this function, there's a 99% chance you're doing it wrong.

The scheduler is at all times free to pick the calling task as the most eligible task to run, if removing the **yield** call from your code breaks it, its already broken.

## TYPICAL BROKEN USAGE IS

while (!event) **yield**;

where one assumes that **yield** will let 'the other' process run that will make event true. If the current task is a SCHED\_FIFO task that will never happen. Never use **yield** as a progress guarantee!!

If you want to use **yield** to wait for something, use **wait\_event**. If you want to use **yield** to be 'nice' for others, use **cond\_resched**. If you still want to use **yield**, do not!

## COPYRIGHT
