--- Net2/arch/hp300/dev/hil.c 2018/04/24 18:04:00 1.1 +++ Net2/arch/hp300/dev/hil.c 2018/04/24 18:19:10 1.1.1.2 @@ -37,7 +37,8 @@ * * from: Utah $Hdr: hil.c 1.33 89/12/22$ * - * @(#)hil.c 7.8.1.1 (Berkeley) 6/28/91 + * from: @(#)hil.c 7.8.1.1 (Berkeley) 6/28/91 + hil.c,v 1.5 1993/07/12 11:38:11 mycroft Exp */ #include "sys/param.h" @@ -46,6 +47,7 @@ #include "sys/user.h" #include "sys/ioctl.h" #include "sys/file.h" +#include "sys/select.h" #include "sys/tty.h" #include "sys/systm.h" #include "sys/uio.h" @@ -671,11 +673,7 @@ hilselect(dev, rw, p) splx(s); return (1); } - if (dptr->hd_selr && - dptr->hd_selr->p_wchan == (caddr_t)&selwait) - dptr->hd_flags |= HIL_SELCOLL; - else - dptr->hd_selr = p; + selrecord(p, &dptr->hd_selr); splx(s); return (0); } @@ -709,10 +707,7 @@ hilselect(dev, rw, p) return (1); } - if (dptr->hd_selr && dptr->hd_selr->p_wchan == (caddr_t)&selwait) - dptr->hd_flags |= HIL_SELCOLL; - else - dptr->hd_selr = p; + selrecord(p, &dptr->hd_selr); splx(s); return (0); } @@ -915,17 +910,9 @@ hilevent(hilp) /* * Wake up anyone selecting on this device or the loop itself */ - if (dptr->hd_selr) { - selwakeup(dptr->hd_selr, dptr->hd_flags & HIL_SELCOLL); - dptr->hd_selr = NULL; - dptr->hd_flags &= ~HIL_SELCOLL; - } + selwakeup(&dptr->hd_selr); dptr = &hilp->hl_device[HILLOOPDEV]; - if (dptr->hd_selr) { - selwakeup(dptr->hd_selr, dptr->hd_flags & HIL_SELCOLL); - dptr->hd_selr = NULL; - dptr->hd_flags &= ~HIL_SELCOLL; - } + selwakeup(&dptr->hd_selr); } #undef HQFULL @@ -967,11 +954,7 @@ hpuxhilevent(hilp, dptr) dptr->hd_flags &= ~HIL_ASLEEP; wakeup((caddr_t)dptr); } - if (dptr->hd_selr) { - selwakeup(dptr->hd_selr, dptr->hd_flags & HIL_SELCOLL); - dptr->hd_selr = NULL; - dptr->hd_flags &= ~HIL_SELCOLL; - } + selwakeup(&dptr->hd_selr); } /*