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