xref: /openbsd-src/lib/libpthread/man/pthread_yield.3 (revision a28daedfc357b214be5c701aa8ba8adb29a7f1c2)
1.\" $OpenBSD: pthread_yield.3,v 1.4 2007/05/31 19:19:37 jmc Exp $
2.\"
3.\" PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org>
4.\"
5.Dd $Mdocdate: May 31 2007 $
6.Dt PTHREAD_YIELD 3
7.Os
8.Sh NAME
9.Nm pthread_yield
10.Nd yield control of the current thread
11.Sh SYNOPSIS
12.Fd #include <pthread.h>
13.Ft void
14.Fn pthread_yield "void"
15.Sh DESCRIPTION
16The
17.Fn pthread_yield
18function resets the accumulated time slice of the current thread and then
19enters the thread scheduler, which resumes execution of the next thread ready
20to run.
21If no other thread is ready to run, control returns to the current thread.
22.Sh SEE ALSO
23.Xr pthreads 3
24.Sh STANDARDS
25.Fn pthread_yield
26is a non-portable (but quite common) extension to
27.St -p1003.1-2001 .
28