diff options
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/Makefile.inc | 4 | ||||
-rw-r--r-- | lib/libc/sys/sched_yield.2 | 49 |
2 files changed, 51 insertions, 2 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 78535b041fa..9621119dea9 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.122 2014/08/31 04:02:08 guenther Exp $ +# $OpenBSD: Makefile.inc,v 1.123 2014/11/14 00:24:28 guenther Exp $ # $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/17/93 @@ -212,7 +212,7 @@ MAN+= __get_tcb.2 __thrsigdivert.2 __thrsleep.2 _exit.2 accept.2 \ msgget.2 msgrcv.2 msgsnd.2 msync.2 munmap.2 nanosleep.2 \ nfssvc.2 open.2 pathconf.2 pipe.2 poll.2 profil.2 \ ptrace.2 quotactl.2 read.2 readlink.2 reboot.2 recv.2 \ - rename.2 revoke.2 rmdir.2 select.2 semctl.2 semget.2 \ + rename.2 revoke.2 rmdir.2 sched_yield.2 select.2 semctl.2 semget.2 \ semop.2 send.2 setgroups.2 setpgid.2 setregid.2 \ setresuid.2 setreuid.2 setsid.2 sendsyslog.2 setuid.2 shmat.2 \ shmctl.2 shmget.2 shutdown.2 sigaction.2 sigaltstack.2 sigpending.2 \ diff --git a/lib/libc/sys/sched_yield.2 b/lib/libc/sys/sched_yield.2 new file mode 100644 index 00000000000..ca7c6df71ae --- /dev/null +++ b/lib/libc/sys/sched_yield.2 @@ -0,0 +1,49 @@ +.\" $OpenBSD: sched_yield.2,v 1.1 2014/11/14 00:24:28 guenther Exp $ +.\" +.\" Copyright (c) 2014 Philip Guenther <guenther@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: November 14 2014 $ +.Dt SCHED_YIELD 2 +.Os +.Sh NAME +.Nm sched_yield +.Nd yield the processor +.Sh SYNOPSIS +.In sched.h +.Ft int +.Fn sched_yield void +.Sh DESCRIPTION +The +.Fn sched_yield +function makes the current thread yield the processor and be put at +the end of its run queue without altering its priority. +.Sh RETURN VALUES +.Rv -std +.Sh STANDARDS +The +.Fn sched_yield +function conforms to +.St -p1003.1-2008 . +.Sh HISTORY +The +.Fn sched_yield +system call appeared in +.Ox 4.2 . +.Sh CAVEATS +The effect of +.Fn sched_yield +is only precisely defined for real-time scheduling classes, +none of which are currently supported by +.Ox . |