1SCHED_YIELD(2)             Linux Programmer's Manual            SCHED_YIELD(2)
2
3
4

NAME

6       sched_yield - yield the processor
7

SYNOPSIS

9       #include <sched.h>
10
11       int sched_yield(void);
12

DESCRIPTION

14       A  process can relinquish the processor voluntarily without blocking by
15       calling sched_yield().  The process will then be moved to  the  end  of
16       the queue for its static priority and a new process gets to run.
17
18       Note:  If the current process is the only process in the highest prior‐
19       ity list at that time, this process will continue to run after  a  call
20       to sched_yield().
21
22       POSIX  systems on which sched_yield() is available define _POSIX_PRIOR‐
23       ITY_SCHEDULING in <unistd.h>.
24
25

RETURN VALUE

27       On success, sched_yield() returns 0.  On error,  -1  is  returned,  and
28       errno is set appropriately.
29
30

CONFORMING TO

32       POSIX.1-2001.
33

SEE ALSO

35       sched_setscheduler(2) for a description of Linux scheduling.
36
37       Programming  for  the  real  world  -  POSIX.4  by Bill O. Gallmeister,
38       O'Reilly & Associates, Inc., ISBN 1-56592-074-0
39
40
41
42Linux 1.3.81                      1996-04-10                    SCHED_YIELD(2)
Impressum