diff options
author | bde <bde@FreeBSD.org> | 1998-06-21 11:33:32 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-06-21 11:33:32 +0000 |
commit | 7645c5747039df0ea1540e22d911a18e309eab8d (patch) | |
tree | 267a41ccb7aa5b2e3e76ec452479c6172d5ea461 /sys/i386/isa/random_machdep.c | |
parent | 203d5be5bfd188411b34d5a1bcc08aceff4ebda3 (diff) | |
download | FreeBSD-src-7645c5747039df0ea1540e22d911a18e309eab8d.zip FreeBSD-src-7645c5747039df0ea1540e22d911a18e309eab8d.tar.gz |
Converted add_interrupt_randomness() to take a `void *' arg. Rewrote
mmioctl() to fix hundreds of style bugs and a few error handling bugs
(don't check for superuser privilege for inappropriate ioctls, don't
check the input arg for the output-only MEM_RETURNIRQ ioctl, and don't
return EPERM for null changes).
Diffstat (limited to 'sys/i386/isa/random_machdep.c')
-rw-r--r-- | sys/i386/isa/random_machdep.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/i386/isa/random_machdep.c b/sys/i386/isa/random_machdep.c index 9f2e610..d635668 100644 --- a/sys/i386/isa/random_machdep.c +++ b/sys/i386/isa/random_machdep.c @@ -1,7 +1,7 @@ /* * random_machdep.c -- A strong random number generator * - * $Id: random_machdep.c,v 1.27 1998/06/09 13:10:46 phk Exp $ + * $Id: random_machdep.c,v 1.28 1998/06/18 15:32:07 bde Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -49,6 +49,7 @@ #include <machine/random.h> #include <i386/isa/icu.h> +#include <i386/isa/intr_machdep.h> #define MAX_BLKDEV 4 @@ -104,9 +105,6 @@ static struct timer_rand_state blkdev_timer_state[MAX_BLKDEV]; #endif static struct wait_queue *random_wait; -inthand2_t *sec_intr_handler[ICU_LEN]; -void *sec_intr_unit[ICU_LEN]; - #ifndef MIN #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #endif @@ -226,10 +224,14 @@ add_keyboard_randomness(u_char scancode) } void -add_interrupt_randomness(int irq) +add_interrupt_randomness(void *vsc) { - (sec_intr_handler[irq])(sec_intr_unit[irq]); - add_timer_randomness(&random_state, &irq_timer_state[irq], irq); + int intr; + struct random_softc *sc = vsc; + + (sc->sc_handler)(sc->sc_arg); + intr = sc->sc_intr; + add_timer_randomness(&random_state, &irq_timer_state[intr], intr); } #ifdef notused |