diff options
author | gibbs <gibbs@FreeBSD.org> | 1997-09-21 21:33:10 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1997-09-21 21:33:10 +0000 |
commit | 0e62d096dbbeb1a2e796a208de7c7362b54e0640 (patch) | |
tree | 85b2ad2997655142f3ab34890610d9906f9d4f81 /sys/i386/bios | |
parent | f01c3975d53f8539b124b8f52f34d8a628d3c97f (diff) | |
download | FreeBSD-src-0e62d096dbbeb1a2e796a208de7c7362b54e0640.zip FreeBSD-src-0e62d096dbbeb1a2e796a208de7c7362b54e0640.tar.gz |
Convert to the new callout interface.
Diffstat (limited to 'sys/i386/bios')
-rw-r--r-- | sys/i386/bios/apm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index d2cc5b8..e6bc26b 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -15,7 +15,7 @@ * * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm.c,v 1.58 1997/06/15 02:19:40 wollman Exp $ + * $Id: apm.c,v 1.59 1997/06/19 00:25:03 wollman Exp $ */ #include <sys/param.h> @@ -65,6 +65,9 @@ static struct apmhook *hook[NAPM_HOOK]; /* XXX */ /* Map version number to integer (keeps ordering of version numbers) */ #define INTVERSION(major, minor) ((major)*100 + (minor)) +static struct callout_handle apm_timeout_ch = + CALLOUT_HANDLE_INITIALIZER(&apm_timeout_ch); + static timeout_t apm_timeout; static d_open_t apmopen; static d_close_t apmclose; @@ -501,7 +504,8 @@ apm_timeout(void *dummy) apm_processevent(); if (sc->active == 1) - timeout(apm_timeout, NULL, hz - 1 ); /* More than 1 Hz */ + /* Run slightly more oftan than 1 Hz */ + apm_timeout_ch = timeout(apm_timeout, NULL, hz - 1 ); } /* enable APM BIOS */ @@ -529,7 +533,7 @@ apm_event_disable(void) printf("called apm_event_disable()\n"); #endif if (sc->initialized) { - untimeout(apm_timeout, NULL); + untimeout(apm_timeout, NULL, apm_timeout_ch); sc->active = 0; } } |