NetBSD/share/man/man9/man9.i386/splraise.9

86 lines
2.8 KiB
Groff

.\" $NetBSD: splraise.9,v 1.1 2010/02/06 22:32:08 dyoung Exp $
.\"
.\" Copyright (c) 2010 David Young. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. The name of the author may not be used to endorse or promote products
.\" derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (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 February 5, 2010
.Dt SPLRAISE 9
.Os
.Sh NAME
.Nm spllower ,
.Nm splraise
.Nd modify system interrupt priority level
.Sh SYNOPSIS
.In machine/intr.h
.Ft void
.Fn spllower "int s"
.Ft int
.Fn splraise "int s"
.Sh DESCRIPTION
These functions raise and lower the interrupt priority level
on i386.
They are used by machine-dependent kernel code to implement
the machine-independent
.Xr spl 9
interface.
.Pp
In a multi-CPU system, these functions change the interrupt
priority level on the local CPU only.
In general, device drivers should not make use of these functions.
.Pp
The
.Fn spllower
function sets the system priority level to the one encoded in
.Fa s ,
if
.Fa s
is lower than the current level.
Otherwise, it does not change the level.
Use
.Fn splx
instead
of
.Fn spllower ,
except in extraordinary circumstances.
.Pp
The
.Fn splraise
function sets the system priority level to the one encoded in
.Fa s ,
if
.Fa s
is greater than the current level, and returns the previous level.
Otherwise, it does not change the level, and it returns the current level.
Except in extraordinary circumstances,
do not use
.Fn splraise .
Use one of the priority-raising functions defined in
.Xr spl 9 ,
instead.
.Sh SEE ALSO
.Xr condvar 9 ,
.Xr mutex 9 ,
.Xr rwlock 9 ,
.Xr spl 9