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

NAME

6       pthread_yield - yield the processor
7

SYNOPSIS

9       #define _GNU_SOURCE             /* See feature_test_macros(7) */
10       #include <pthread.h>
11
12       int pthread_yield(void);
13
14       Compile and link with -pthread.
15

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

CONFORMING TO

31       This call is nonstandard, but present on several  other  systems.   Use
32       the standardized sched_yield(2) instead.
33

NOTES

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

SEE ALSO

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

COLOPHON

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