diff options
author | gibbs <gibbs@FreeBSD.org> | 1997-09-21 22:02:25 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1997-09-21 22:02:25 +0000 |
commit | a415512fd4b3c95c87808401c97e649c8ac7f41e (patch) | |
tree | 8463ee0d001498dfdefc34fc8911c491b2f0ecf0 /sys/net/if_sl.c | |
parent | 52ace446d29ab170f74f1db02832f24b01e04f20 (diff) | |
download | FreeBSD-src-a415512fd4b3c95c87808401c97e649c8ac7f41e.zip FreeBSD-src-a415512fd4b3c95c87808401c97e649c8ac7f41e.tar.gz |
Update for new callout interface.
Diffstat (limited to 'sys/net/if_sl.c')
-rw-r--r-- | sys/net/if_sl.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 7d2f176..08cea82 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_sl.c 8.6 (Berkeley) 2/1/94 - * $Id: if_sl.c,v 1.58 1997/08/02 14:32:39 bde Exp $ + * $Id: if_sl.c,v 1.59 1997/08/13 14:57:14 ache Exp $ */ /* @@ -332,11 +332,11 @@ slclose(tp,flag) if (sc != NULL) { if (sc->sc_outfill) { sc->sc_outfill = 0; - untimeout(sl_outfill, sc); + untimeout(sl_outfill, sc, sc->sc_ofhandle); } if (sc->sc_keepalive) { sc->sc_keepalive = 0; - untimeout(sl_keepalive, sc); + untimeout(sl_keepalive, sc, sc->sc_kahandle); } if_down(&sc->sc_if); sc->sc_flags &= SC_STATIC; @@ -408,10 +408,13 @@ sltioctl(tp, cmd, data, flag, p) sc->sc_keepalive = *(u_int *)data * hz; if (sc->sc_keepalive) { sc->sc_flags |= SC_KEEPALIVE; - timeout(sl_keepalive, sc, sc->sc_keepalive); + sc->sc_kahandle = timeout(sl_keepalive, sc, + sc->sc_keepalive); } else { - sc->sc_flags &= ~SC_KEEPALIVE; - untimeout(sl_keepalive, sc); + if ((sc->sc_flags & SC_KEEPALIVE) != 0) { + untimeout(sl_keepalive, sc, sc->sc_kahandle); + sc->sc_flags &= ~SC_KEEPALIVE; + } } break; @@ -423,10 +426,13 @@ sltioctl(tp, cmd, data, flag, p) sc->sc_outfill = *(u_int *)data * hz; if (sc->sc_outfill) { sc->sc_flags |= SC_OUTWAIT; - timeout(sl_outfill, sc, sc->sc_outfill); + sc->sc_ofhandle = timeout(sl_outfill, sc, + sc->sc_outfill); } else { - sc->sc_flags &= ~SC_OUTWAIT; - untimeout(sl_outfill, sc); + if ((sc->sc_flags & SC_OUTWAIT) != 0) { + untimeout(sl_outfill, sc, sc->sc_ofhandle); + sc->sc_flags &= ~SC_OUTWAIT; + } } break; @@ -1005,10 +1011,9 @@ sl_keepalive(chan) pgsignal (sc->sc_ttyp->t_pgrp, SIGURG, 1); else sc->sc_flags |= SC_KEEPALIVE; - timeout(sl_keepalive, sc, sc->sc_keepalive); + sc->sc_kahandle = timeout(sl_keepalive, sc, sc->sc_keepalive); } else { sc->sc_flags &= ~SC_KEEPALIVE; - untimeout(sl_keepalive, sc); } } @@ -1029,10 +1034,9 @@ sl_outfill(chan) splx (s); } else sc->sc_flags |= SC_OUTWAIT; - timeout(sl_outfill, sc, sc->sc_outfill); + sc->sc_ofhandle = timeout(sl_outfill, sc, sc->sc_outfill); } else { sc->sc_flags &= ~SC_OUTWAIT; - untimeout(sl_outfill, sc); } } |