SCCS-vsn: sys/hp/dev/hil.c 7.11
*
* from: Utah $Hdr: hil.c 1.33 89/12/22$
*
*
* from: Utah $Hdr: hil.c 1.33 89/12/22$
*
- * @(#)hil.c 7.10 (Berkeley) %G%
+ * @(#)hil.c 7.11 (Berkeley) %G%
*/
#include "sys/param.h"
*/
#include "sys/param.h"
- 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);
- 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);
/*
* Wake up anyone selecting on this device or the loop itself
*/
/*
* 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];
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);
dptr->hd_flags &= ~HIL_ASLEEP;
wakeup((caddr_t)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);