Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Mar 2001 12:43:17 -0800 (PST)
From:      Matthew Jacob <mjacob@feral.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        arch@FreeBSD.org
Subject:   'final' man pages
Message-ID:  <Pine.LNX.4.21.0103171241240.2328-100000@zeppo.feral.com>
In-Reply-To: <Pine.LNX.4.21.0103161434140.773-100000@zeppo.feral.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Incorporating Terry's comments, here's my last cut for the three
functions... I think it's better if they're separate man pages.

Can we all move to closure on this? The only other issue I can think of here
is the semantics of an enable_intr() in between a disable_intr/restore_intr
call.


.\" -*- nroff -*-
.\"
.\" Copyright (c) 2001 Matthew Jacob
.\"
.\" All rights reserved.
.\"
.\" This program is free software.
.\"
.\" 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.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``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 DEVELOPERS 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.
.\"
.\" $FreeBSD: $
.\"
.Dd March 16, 2001
.Dt RESTORE_INTR 9
.Os FreeBSD
.Sh NAME
.Nm restore_intr
.Nd restore interrupt
dispatch
.Sh SYNOPSIS
.Fd #include <machine/cpufunc.h>
.Ft void
.Fn restore_intr "intrmask_t"
.Sh DESCRIPTION
.Pp
This function restores the state prior to a previous call to
.Xr disable_intr 9
such that the calling CPU may now have interrupts dispatched to it again.
The argument is the value returned from a previous call to
.Xr disable_intr 9 .
.Pp
It is undefined what will occur if random values are passed to
.Xr enable_intr 9 .
.Sh SEE ALSO
.Xr disable_intr 9
.Xr enable_intr 9
.Sh AUTHORS
.An arch@freebsd.org
-------
.\" -*- nroff -*-
.\"
.\" Copyright (c) 2001 Matthew Jacob
.\"
.\" All rights reserved.
.\"
.\" This program is free software.
.\"
.\" 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.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``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 DEVELOPERS 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.
.\"
.\" $FreeBSD: $
.\"
.Dd March 16, 2001
.Dt DISABLE_INTR 9
.Os FreeBSD
.Sh NAME
.Nm disable_intr
.Nd disable interrupt
dispatch
.Sh SYNOPSIS
.Fd #include <machine/cpufunc.h>
.Ft intrmask_t
.Fn disable_intr "void"
.Sh DESCRIPTION
.Pp
This function inhibits interrupts from being be dispatched to the
CPU this function is called from. It returns an interrupt mask
value which must be used in a future call to
.Xr restore_intr 9 .
.Pp
The purpose of this function is inhibit interrupts from being dispatched
to the calling CPU. It may be used to ensure the timely execution of short
segments of hardware dependent critical code. It may also be used
to ensure the preservation of certain platform specific machine state
when calls outside of the kernel (e.g., to supporting PROM code) are made.
.Pp
This function cannot guarantee that interrupts will also be blocked
from delivery to other CPUs. Therefore, it cannot be used as a replacement
for the appropriate SMP locking.
.Pp
Use this function with caution, as misuse will likely hang the system.
.Sh RETURN VALUES
Returns a interrupt mask value that is to be later passed
.Xr restore_intr 9 .
.Xr 
.Sh SEE ALSO
.Xr restore_intr 9 ,
.Xr enable_intr 9
.Sh AUTHORS
.An arch@freebsd.org
-------

.\" -*- nroff -*-
.\"
.\" Copyright (c) 2001 Matthew Jacob
.\"
.\" All rights reserved.
.\"
.\" This program is free software.
.\"
.\" 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.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``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 DEVELOPERS 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.
.\"
.\" $FreeBSD: $
.\"
.Dd March 16, 2001
.Dt ENABLE_INTR 9
.Os FreeBSD
.Sh NAME
.Nm enable_intr
.Nd enable interrupt
dispatch
.Sh SYNOPSIS
.Fd #include <machine/cpufunc.h>
.Ft void
.Fn enable_intr "void"
.Sh DESCRIPTION
.Pp
This function enables interrupt dispatching to the calling CPU.
.Sh SEE ALSO
.Xr disable_intr 9
.Xr restore_intr 9
.Sh AUTHORS
.An arch@freebsd.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0103171241240.2328-100000>