summaryrefslogtreecommitdiff
path: root/share/man/man9/dopowerhooks.9
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-07-01 14:45:46 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-07-01 14:45:46 +0000
commitf2a3d530ae72948ba706dc14c2d10cc6f52d0415 (patch)
tree7682dfd7de8e8978f5bce90cb3148d4f6c01b6c5 /share/man/man9/dopowerhooks.9
parentde24e57f3d6e3259658a4cf65b4647446335da7f (diff)
Add man pages for the kernel power hook mechanisms.
Diffstat (limited to 'share/man/man9/dopowerhooks.9')
-rw-r--r--share/man/man9/dopowerhooks.965
1 files changed, 65 insertions, 0 deletions
diff --git a/share/man/man9/dopowerhooks.9 b/share/man/man9/dopowerhooks.9
new file mode 100644
index 00000000000..f9961d882c6
--- /dev/null
+++ b/share/man/man9/dopowerhooks.9
@@ -0,0 +1,65 @@
+.\" $OpenBSD: dopowerhooks.9,v 1.1 2000/07/01 14:45:45 aaron Exp $
+.\"
+.\" Copyright (c) 2000 Aaron Campbell
+.\" 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. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Christopher G. Demetriou
+.\" for the NetBSD Project.
+.\" 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 July 1, 2000
+.Dt DOPOWERHOOKS 9
+.Os
+.Sh NAME
+.Nm dopowerhooks
+.Nd run all power hooks
+.Sh SYNOPSIS
+.Ft void
+.Fn dopowerhooks "int why"
+.Sh DESCRIPTION
+The
+.Fn dopowerhooks
+function invokes all power hooks established using the
+.Xr powerhook_establish 9
+function.
+Power hooks are called in reverse order, i.e., the power hook established
+last will be called first.
+.Pp
+This routine is called from the
+.Xr apm 4
+driver when a power change is detected.
+The
+.Fa why
+argument is one of
+.Dv PWR_SUSPEND ,
+.Dv PWR_STANDBY ,
+or
+.Dv PWR_RESUME ,
+describing the reason for the change in power state.
+Each established power hook is passed this information so the appropriate
+actions can be taken.
+.Sh SEE ALSO
+.Xr apm 4 ,
+.Xr powerhook_establish 9