diff options
| author | Justin T. Gibbs <gibbs@FreeBSD.org> | 1997-09-21 21:33:10 +0000 |
|---|---|---|
| committer | Justin T. Gibbs <gibbs@FreeBSD.org> | 1997-09-21 21:33:10 +0000 |
| commit | 607e08109a35e92a35202a389120df3fd6422301 (patch) | |
| tree | 3659fe7b10e1d9dfbaf91774493bf066b0db1648 | |
| parent | b505574de99440d527493928dfd6c834e9c423ae (diff) | |
Notes
| -rw-r--r-- | sys/i386/apm/apm.c | 10 | ||||
| -rw-r--r-- | sys/i386/bios/apm.c | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c index d2cc5b8c7b13..e6bc26bf1f9e 100644 --- a/sys/i386/apm/apm.c +++ b/sys/i386/apm/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; } } diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index d2cc5b8c7b13..e6bc26bf1f9e 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; } } |
