sched_yield Subroutine

Purpose

Yields the processor.

Library

Standard C Library (libc.a)

Syntax

#include <sched.h>

int sched_yield (void);

Description

The sched_yield subroutine forces the running thread to relinquish the processor until it again becomes the head of its thread list. It takes no parameters.

Return Values

The sched_yield subroutine returns 0 if it completes successfully. Otherwise, it returns -1 and sets errno to indicate the error.

Error Codes

The sched_yield subroutine fails if:
Item Description
ENOTSUP This interface does not support processes capable of checkpoint.