2 .\" Copyright (c) 2009 Michael Kerrisk, <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .TH pthread_yield 3 (date) "Linux man-pages (unreleased)"
8 pthread_yield \- yield the processor
11 .RI ( libpthread ", " \-lpthread )
14 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
15 .B #include <pthread.h>
17 .B [[deprecated]] int pthread_yield(void);
21 This function is deprecated; see below.
24 causes the calling thread to relinquish the CPU.
25 The thread is placed at the end of the run queue for its static
26 priority and another thread is scheduled to run.
27 For further details, see
33 on error, it returns an error number.
35 On Linux, this call always succeeds
36 (but portable and future-proof applications should nevertheless
37 handle a possible error return).
39 For an explanation of the terms used in this section, see
45 Interface Attribute Value
50 T} Thread safety MT-Safe
54 On Linux, this function is implemented as a call to
59 .\" BSD, Tru64, AIX, and Irix.
60 Deprecated since glibc 2.34.
66 is intended for use with real-time scheduling policies (i.e.,
72 with nondeterministic scheduling policies such as
74 is unspecified and very likely means your application design is broken.
77 .\" FIXME . .BR pthread_cond_wait (3),