diff options
author | msmith <msmith@FreeBSD.org> | 1999-08-21 06:24:40 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1999-08-21 06:24:40 +0000 |
commit | b51f157bff8b959d943b0836a1c57f065b9318d5 (patch) | |
tree | e447ab34080a4d202ed41db3476df31ef1f56a50 /sys/i386/bios | |
parent | a753b272ec1066c690e1ba83c8780af55e3a6c78 (diff) | |
download | FreeBSD-src-b51f157bff8b959d943b0836a1c57f065b9318d5.zip FreeBSD-src-b51f157bff8b959d943b0836a1c57f065b9318d5.tar.gz |
Implement a new generic mechanism for attaching handler functions to
events, in order to pave the way for removing a number of the ad-hoc
implementations currently in use.
Retire the at_shutdown family of functions and replace them with
new event handler lists.
Rework kern_shutdown.c to take greater advantage of the use of event
handlers.
Reviewed by: green
Diffstat (limited to 'sys/i386/bios')
-rw-r--r-- | sys/i386/bios/apm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index d2c2264..1beb8b5 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -15,13 +15,14 @@ * * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm.c,v 1.98 1999/08/02 18:46:34 msmith Exp $ + * $Id: apm.c,v 1.99 1999/08/14 18:39:40 iwasaki Exp $ */ #include "opt_devfs.h" #include <sys/param.h> #include <sys/systm.h> +#include <sys/eventhandler.h> #include <sys/conf.h> #include <sys/kernel.h> #ifdef DEVFS @@ -302,7 +303,7 @@ apm_display(int newstate) * Turn off the entire system. */ static void -apm_power_off(int howto, void *junk) +apm_power_off(void *junk, int howto) { struct apm_softc *sc = &apm_softc; @@ -1047,7 +1048,8 @@ apm_attach(device_t dev) apm_hook_establish(APM_HOOK_RESUME , &sc->sc_resume); /* Power the system off using APM */ - at_shutdown_pri(apm_power_off, NULL, SHUTDOWN_FINAL, SHUTDOWN_PRI_LAST); + EVENTHANDLER_REGISTER(shutdown_final, apm_power_off, NULL, + SHUTDOWN_PRI_LAST); sc->initialized = 1; |