Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

sched_yield(3C)

Name

sched_yield - yield processor

Synopsis

#include <sched.h>

int sched_yield(void);

Description

The sched_yield() function forces the running thread to relinquish the processor until the process again becomes the head of its process list. It takes no arguments.

Return Values

If successful, sched_yield() returns 0, otherwise, it returns −1, and sets errno to indicate the error condition.

Errors

No errors are defined.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
MT-Safe
Standard

See Also

sched.h(3HEAD), librt(3LIB), attributes(7), standards(7)