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

NAME

6       pthread_yield - yield the processor
7

SYNOPSIS

9       #include <pthread.h>
10
11       int pthread_yield(void);
12
13       Compile and link with -pthread.
14

DESCRIPTION

16       pthread_yield()  causes  the calling thread to relinquish the CPU.  The
17       thread is placed at the end of the run queue for  its  static  priority
18       and  another  thread  is  scheduled  to  run.  For further details, see
19       sched_yield(2)
20

RETURN VALUE

22       On success, pthread_yield() returns 0; on error, it  returns  an  error
23       number.
24

ERRORS

26       On  Linux,  this  call  always  succeeds (but portable and future-proof
27       applications should nevertheless handle a possible error return).
28

CONFORMING TO

30       This call is non-standard, but present on several other  systems.   Use
31       the standardized sched_yield(2) instead.
32

NOTES

34       On Linux, this function is implemented as a call to sched_yield(2).
35

SEE ALSO

37       sched_setscheduler(2), sched_yield(2) pthreads(7)
38

COLOPHON

40       This  page  is  part of release 3.22 of the Linux man-pages project.  A
41       description of the project, and information about reporting  bugs,  can
42       be found at http://www.kernel.org/doc/man-pages/.
43
44
45
46Linux                             2009-04-10                  PTHREAD_YIELD(3)
Impressum