yield Subroutine

Purpose

Yields the processor to processes with higher priorities.

Library

Standard C library (libc.a)

Syntax

void yield (void);

Description

The yield subroutine forces the current running process or thread to relinquish use of the processor. If the run queue is empty when the yield subroutine is called, the calling process or kernel thread is immediately rescheduled. If the calling process has multiple threads, only the calling thread is affected. The process or thread resumes execution after all threads of equal or greater priority are scheduled to run.