summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmatthew <jmatthew@openbsd.org>2017-09-05 03:49:56 +0000
committerjmatthew <jmatthew@openbsd.org>2017-09-05 03:49:56 +0000
commit84eb796f31be5cb26d74c92cc2583b24360b30b0 (patch)
treeb1f20ed5e5f9236f42cfcf5d398f9c0282ce3a4c
parentNew POSIX xlocale implementation written from scratch. (diff)
downloadwireguard-openbsd-84eb796f31be5cb26d74c92cc2583b24360b30b0.tar.xz
wireguard-openbsd-84eb796f31be5cb26d74c92cc2583b24360b30b0.zip
bring mi_switch() manpage up to date
ok mpi@ guenther@
-rw-r--r--share/man/man9/mi_switch.920
1 files changed, 9 insertions, 11 deletions
diff --git a/share/man/man9/mi_switch.9 b/share/man/man9/mi_switch.9
index b04179fa79d..b8ecea18e9e 100644
--- a/share/man/man9/mi_switch.9
+++ b/share/man/man9/mi_switch.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mi_switch.9,v 1.6 2017/07/06 15:42:04 schwarze Exp $
+.\" $OpenBSD: mi_switch.9,v 1.7 2017/09/05 03:49:56 jmatthew Exp $
.\" $NetBSD: ctxsw.9,v 1.9 1999/03/06 22:09:29 mycroft Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 6 2017 $
+.Dd $Mdocdate: September 5 2017 $
.Dt MI_SWITCH 9
.Os
.Sh NAME
@@ -54,11 +54,12 @@ The three major uses of
can be enumerated as follows:
.Bl -enum -offset indent
.It
-From within
-.Xr tsleep 9
-when the current process
-voluntarily relinquishes the CPU to wait for some resource to become
-available.
+From within functions like
+.Xr tsleep 9 ,
+when the current process sleeps to wait for some resource to become
+available, or from within functions like
+.Fn yield ,
+when it relinquishes the CPU to allow other processes to make progress.
.It
After handling a trap
.Pq e.g., a system call or device interrupt
@@ -85,8 +86,6 @@ Exceeding the soft limit results in a
signal to be posted to the process, while exceeding the hard limit will
cause a
.Dv SIGKILL .
-For a process which accumulated longer than 10 minutes of
-CPU time, its nice level is raised to 4.
After these administrative tasks are done,
.Fn mi_switch
chooses the next process to run and hands over control to the machine
@@ -105,8 +104,7 @@ Note that
.Fn mi_switch
and thus
.Fn cpu_switchto
-should be called at
-.Xr splhigh 9 .
+must be called while holding the scheduler lock.
.Sh SEE ALSO
.Xr spl 9 ,
.Xr tsleep 9 ,