diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2001-08-19 15:07:35 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2001-08-19 15:07:35 +0000 |
commit | 68af87218387ffa40a86125da9459ac9956907ea (patch) | |
tree | 0f31dc4932428f6c7fdeecf086255e2f88976521 /sys/netatalk | |
parent | d74034f18f5e708e8409b442dd4d742d502dbe4f (diff) |
More old timeouts removal, mainly affected unused/unmaintained code.
Diffstat (limited to 'sys/netatalk')
-rw-r--r-- | sys/netatalk/aarp.c | 18 | ||||
-rw-r--r-- | sys/netatalk/at_control.c | 8 |
2 files changed, 18 insertions, 8 deletions
diff --git a/sys/netatalk/aarp.c b/sys/netatalk/aarp.c index 2fb2f0e1179..7c6148d652c 100644 --- a/sys/netatalk/aarp.c +++ b/sys/netatalk/aarp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aarp.c,v 1.2 2001/08/12 12:03:03 heko Exp $ */ +/* $OpenBSD: aarp.c,v 1.3 2001/08/19 15:07:34 miod Exp $ */ /* * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -62,6 +62,7 @@ #include <sys/errno.h> #include <sys/syslog.h> #include <sys/proc.h> +#include <sys/timeout.h> #include <net/if.h> #include <net/route.h> @@ -103,6 +104,9 @@ void aarp_clean __P((void)); struct aarptab aarptab[AARPTAB_SIZE]; int aarptab_size = AARPTAB_SIZE; +struct timeout aarpprobe_timeout; +struct timeout aarptimer_timeout; + #define AARPTAB_HASH(a) \ ((((a).s_net << 8 ) + (a).s_node ) % AARPTAB_NB ) @@ -140,7 +144,7 @@ aarptimer(v) struct aarptab *aat; int i, s; - timeout( aarptimer, (caddr_t)0, AARPT_AGE * hz ); + timeout_add(&aarptimer_timeout, AARPT_AGE * hz); aat = aarptab; for ( i = 0; i < AARPTAB_SIZE; i++, aat++ ) { if ( aat->aat_flags == 0 || ( aat->aat_flags & ATF_PERM )) @@ -437,7 +441,7 @@ at_aarpinput( ac, m ) * probed for the same address we'd like to use. Change the * address we're probing for. */ - untimeout( aarpprobe, ac ); + timeout_del(&aarpprobe_timeout); wakeup( aa ); m_freem( m ); return; @@ -567,7 +571,8 @@ aarptnew( addr ) if ( first ) { first = 0; - timeout( aarptimer, (caddr_t)0, hz ); + timeout_set(&aarptimer_timeout, aarptimer, NULL); + timeout_add(&aarptimer_timeout, hz); } aat = &aarptab[ AARPTAB_HASH( *addr ) * AARPTAB_BSIZ ]; for ( n = 0; n < AARPTAB_BSIZ; n++, aat++ ) { @@ -626,7 +631,8 @@ aarpprobe( arg ) wakeup( aa ); return; } else { - timeout( aarpprobe, (caddr_t)ac, hz / 5 ); + timeout_set(&aarpprobe_timeout, aarpprobe, ac); + timeout_add(&aarpprobe_timeout, hz / 5); } if (( m = m_gethdr( M_DONTWAIT, MT_DATA )) == NULL ) { @@ -686,7 +692,7 @@ aarp_clean(void) struct aarptab *aat; int i; - untimeout( aarptimer, 0 ); + timeout_del(&aarptimer_timeout); for ( i = 0, aat = aarptab; i < AARPTAB_SIZE; i++, aat++ ) { if ( aat->aat_hold ) { m_freem( aat->aat_hold ); diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c index eac2e17a656..da460915145 100644 --- a/sys/netatalk/at_control.c +++ b/sys/netatalk/at_control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: at_control.c,v 1.2 1997/07/24 00:25:22 deraadt Exp $ */ +/* $OpenBSD: at_control.c,v 1.3 2001/08/19 15:07:34 miod Exp $ */ /* * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -62,6 +62,7 @@ #include <sys/errno.h> #include <sys/syslog.h> #include <sys/proc.h> +#include <sys/timeout.h> #include <net/if.h> #include <net/route.h> @@ -97,6 +98,8 @@ static int aa_dosingleroute __P((struct ifaddr *, struct at_addr *, (a)->sat_addr.s_net == (b)->sat_addr.s_net && \ (a)->sat_addr.s_node == (b)->sat_addr.s_node ) +extern struct timeout aarpprobe_timeout; + int at_control( cmd, data, ifp, p ) u_long cmd; @@ -413,8 +416,9 @@ at_ifinit( ifp, aa, sat ) continue; } aa->aa_probcnt = 10; + timeout_set(&aarpprobe_timeout, aarpprobe, ifp); /* XXX don't use hz so badly */ - timeout( aarpprobe, (caddr_t)ifp, hz / 5 ); + timeout_add(&aarpprobe_timeout, hz / 5); if ( tsleep( aa, PPAUSE|PCATCH, "at_ifinit", 0 )) { printf( "at_ifinit why did this happen?!\n" ); aa->aa_addr = oldaddr; |