1 .\" Copyright (c) 2009 Michael Kerrisk, <mtk.manpages@gmail.com>
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .TH PTHREAD_YIELD 3 2021-03-22 "Linux" "Linux Programmer's Manual"
27 pthread_yield \- yield the processor
30 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
31 .B #include <pthread.h>
33 .B int pthread_yield(void);
36 Compile and link with \fI\-pthread\fP.
39 This function is deprecated; see below.
42 causes the calling thread to relinquish the CPU.
43 The thread is placed at the end of the run queue for its static
44 priority and another thread is scheduled to run.
45 For further details, see
51 on error, it returns an error number.
53 On Linux, this call always succeeds
54 (but portable and future-proof applications should nevertheless
55 handle a possible error return).
57 Since glibc 2.34, this function is marked as deprecated.
59 For an explanation of the terms used in this section, see
67 Interface Attribute Value
70 T} Thread safety MT-Safe
76 This call is nonstandard, but present on several other systems.
80 .\" e.g., the BSDs, Tru64, AIX, and Irix.
82 On Linux, this function is implemented as a call to
86 is intended for use with real-time scheduling policies (i.e.,
92 with nondeterministic scheduling policies such as
94 is unspecified and very likely means your application design is broken.
97 .\" FIXME . .BR pthread_cond_wait (3),