From owner-freebsd-arch Sat Mar 17 12:43:33 2001 Delivered-To: freebsd-arch@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id AF29537B71C; Sat, 17 Mar 2001 12:43:18 -0800 (PST) (envelope-from mjacob@feral.com) Received: from zeppo.feral.com (IDENT:mjacob@zeppo [192.67.166.71]) by feral.com (8.9.3/8.9.3) with ESMTP id MAA28194; Sat, 17 Mar 2001 12:43:21 -0800 Date: Sat, 17 Mar 2001 12:43:17 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: John Baldwin Cc: arch@FreeBSD.org Subject: 'final' man pages In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 .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 .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 .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