spl*() functions block interrupts of lesser or equal priority, not
higher priority. do some copy editing while I'm here.
This commit is contained in:
parent
ad1ef53725
commit
b99b737005
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: spl.9,v 1.3 1997/11/11 10:07:25 mrg Exp $
|
||||
.\" $NetBSD: spl.9,v 1.4 1997/11/20 05:47:42 mikel Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1997 Michael Long.
|
||||
.\" Copyright (c) 1997 Jonathan Stone.
|
||||
@ -78,21 +78,25 @@
|
||||
.Fn splx "int s"
|
||||
.Sh DESCRIPTION
|
||||
These functions raise and lower the system priority level.
|
||||
They are used by kernel code running at any given priority level to
|
||||
block higher-priority interrupts, so that it can safely access
|
||||
variables or data structures which are used by kernel code that runs
|
||||
at a higher priority level.
|
||||
They are used by kernel code to block interrupts with priority less
|
||||
than or equal to the named level (e.g.
|
||||
.Fn spltty
|
||||
blocks interrupts of priority less than or equal to
|
||||
.Dv IPL_TTY Ns ).
|
||||
The code may then safely access variables or data structures which are
|
||||
read or modified by interrupt service routines that run at the named
|
||||
level.
|
||||
.Pp
|
||||
A
|
||||
.Nm
|
||||
function exists for each distinct priority level which can exist in
|
||||
the system. These macros and the corresponding priority levels are
|
||||
the system. These functions and the corresponding priority levels are
|
||||
used for various defined purposes, and may be divided into two main
|
||||
types: hard and soft. Hard interrupts are generated by hardware
|
||||
devices, while soft interrupts are generated by callouts and called
|
||||
devices. Soft interrupts are generated by callouts, and are called
|
||||
from the kernel's periodic timer interrupt service routine.
|
||||
.Pp
|
||||
In order of highest to lowest priority, the priority-raising macros
|
||||
In order of highest to lowest priority, the priority-raising functions
|
||||
are:
|
||||
.Bl -tag -width splsoftserialXX
|
||||
.It Fn splhigh
|
||||
@ -142,7 +146,7 @@ blocks hard interrupts from disks and other mass-storage devices.
|
||||
blocks soft network interrupts.
|
||||
.El
|
||||
.Pp
|
||||
Two macros lower the system priority level. They are:
|
||||
Two functions lower the system priority level. They are:
|
||||
.Bl -tag -width splsoftclockXX
|
||||
.It Fn splsoftclock
|
||||
unblocks all interrupts but the soft clock interrupt.
|
||||
@ -152,8 +156,8 @@ unblocks all interrupts.
|
||||
.Pp
|
||||
The
|
||||
.Fn splx
|
||||
macro restores the system priority level to the one encoded in
|
||||
function restores the system priority level to the one encoded in
|
||||
.Fa s ,
|
||||
which must be a value previously returned by one of the other
|
||||
.Nm
|
||||
macros.
|
||||
functions.
|
||||
|
Loading…
Reference in New Issue
Block a user