logo
Free, Micro AI Code Reviews That Run on Git Commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt

sched_yield — yield processor

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.

Errors

On failure errno will be set to the corresponding value: [ENOSYS] The system is not configured to support this functionality.

Library

Standard C Library (libc, -lc)

Name

sched_yield — yield processor

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.

Standards

The sched_yield() system call conforms to IEEE Std 1003.1b-1993 (“POSIX.1”). Debian March 12, 1998 SCHED_YIELD(2)

Synopsis

#include<sched.h>intsched_yield(void);

See Also