xref: /openbsd-src/lib/libpthread/man/pthread_yield.3 (revision daf88648c0e349d5c02e1504293082072c981640)
1.\" $OpenBSD: pthread_yield.3,v 1.3 2004/01/25 14:48:32 jmc Exp $
2.\"
3.\" PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org>
4.\"
5.Dd January 15, 2004
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