int state;
# define UMS_ASLEEP 0x01 /* readFromDevice is waiting */
-# define UMS_SELECT 0x02 /* select is waiting */
struct selinfo rsel; /* process waiting in select */
};
sc->state &= ~UMS_ASLEEP;
wakeup(sc);
}
- if (sc->state & UMS_SELECT) {
- sc->state &= ~UMS_SELECT;
- selwakeup(&sc->rsel);
- }
+ selwakeup(&sc->rsel);
+
dev_ops_remove_minor(&ums_ops, /*-1, */device_get_unit(self));
return 0;
sc->state &= ~UMS_ASLEEP;
wakeup(sc);
}
- if (sc->state & UMS_SELECT) {
- sc->state &= ~UMS_SELECT;
- selwakeup(&sc->rsel);
- }
+ selwakeup(&sc->rsel);
}
static int
if (sc->qcount) {
revents = ap->a_events & (POLLIN | POLLRDNORM);
} else {
- sc->state |= UMS_SELECT;
+ /* sc->state |= UMS_SELECT; */
selrecord(curthread, &sc->rsel);
}
}