---
name: "sched_yield"
section: "2"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/sched_yield"
---

# sched\_yield(2)

yield processor

## NAME

**sched\_yield** – yield processor

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<sched.h\>**

*int*\

**sched\_yield**(*void*);

## DESCRIPTION

The **sched\_yield**() system call forces the running process to relinquish the processor until it again becomes the head of its process list. It takes no arguments.

## RETURN VALUES

The **sched\_yield()** function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

## ERRORS

On failure *errno* will be set to the corresponding value:

- \[ENOSYS\]

  The system is not configured to support this functionality.

## STANDARDS

The **sched\_yield**() system call conforms to IEEE Std 1003.1b-1993 (“POSIX.1b”).
