Note that device drivers should not (in general) use these interfaces.

This commit is contained in:
ad 2007-02-11 16:36:06 +00:00
parent 6f86141195
commit 6fa495aa59
2 changed files with 28 additions and 6 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: spl.9,v 1.24 2006/09/23 11:25:47 wiz Exp $
.\" $NetBSD: spl.9,v 1.25 2007/02/11 16:36:06 ad Exp $
.\"
.\" Copyright (c) 2000, 2001 Jason R. Thorpe. All rights reserved.
.\" Copyright (c) 1997 Michael Long.
@ -27,7 +27,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd September 23, 2006
.Dd Febuary 11, 2007
.Dt SPL 9
.Os
.Sh NAME
@ -91,8 +91,15 @@
These functions raise and lower the system priority level.
They are used by kernel code to block interrupts in critical
sections, in order to protect data structures (much like
a locking primitive) or to ensure uninterrupted access to
hardware devices which are sensitive to timing.
a locking primitive).
.Pp
In general, device drivers should not make use of these interfaces.
To ensure correct synchronization, device drivers should use the
.Xr condvar 9 ,
.Xr mutex 9 ,
and
.Xr rwlock 9
interfaces.
.Pp
Interrupt priorities are not arranged in a strict hierarchy, although
interrupt hardware sometimes is.
@ -259,6 +266,10 @@ is being decreased permanently.
It is inappropriate to attempt to use them where the
system priority level is being decreased temporarily, and would
need to be restored to a previous value before continuing.
.Sh SEE ALSO
.Xr condvar 9 ,
.Xr mutex 9 ,
.Xr rwlock 9
.Sh HISTORY
In
.Bx 4.4 ,

View File

@ -1,4 +1,4 @@
.\" $NetBSD: splraiseipl.9,v 1.3 2006/12/23 10:01:32 wiz Exp $
.\" $NetBSD: splraiseipl.9,v 1.4 2007/02/11 16:36:06 ad Exp $
.\"
.\" Copyright (c)2006 YAMAMOTO Takashi,
.\" All rights reserved.
@ -25,7 +25,7 @@
.\" SUCH DAMAGE.
.\"
.\" ------------------------------------------------------------
.Dd December 22, 2006
.Dd Febuary, 2007
.Dt SPLRAISEIPL 9
.Os
.\" ------------------------------------------------------------
@ -47,6 +47,14 @@ raises the system priority level to the level specified by
.Fa icookie
should be a value returned by
.Fn makeiplcookie .
.Pp
In general, device drivers should not make use of this interface.
To ensure correct synchronization, device drivers should use the
.Xr condvar 9 ,
.Xr mutex 9 ,
and
.Xr rwlock 9
interfaces.
.\" ------------------------------------------------------------
.Sh RETURN VALUES
.Fn splraiseipl
@ -84,5 +92,8 @@ it's better to do it beforehand.
.Ed
.\" ------------------------------------------------------------
.Sh SEE ALSO
.Xr condvar 9 ,
.Xr makeiplcookie 9 ,
.Xr mutex 9 ,
.Xr rwlock 9 ,
.Xr spl 9