From: Matthew Dillon Date: Thu, 8 Jul 2010 23:04:25 +0000 (-0700) Subject: dev - Properly propogate wakeup events for ums X-Git-Tag: v2.8.0~690^2~21 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/173360594997c33e4685c2a9f26732bdfc8cc805 dev - Properly propogate wakeup events for ums * The last commit had a minor problem. It turns out that the selwakeup() code does not generate a kqueue event or wake it up if no select pid was set, and since select() now uses kqueue no select pid will ever be set. * Calling KNOTE() directly solves the problem. --- diff --git a/sys/dev/usbmisc/ums/ums.c b/sys/dev/usbmisc/ums/ums.c index 3819c78..eda339a 100644 --- a/sys/dev/usbmisc/ums/ums.c +++ b/sys/dev/usbmisc/ums/ums.c @@ -385,6 +385,7 @@ ums_detach(device_t self) wakeup(sc); } selwakeup(&sc->rsel); + KNOTE(&sc->rsel.si_note, 0); dev_ops_remove_minor(&ums_ops, /*-1, */device_get_unit(self)); @@ -517,6 +518,7 @@ ums_add_to_queue(struct ums_softc *sc, int dx, int dy, int dz, int buttons) wakeup(sc); } selwakeup(&sc->rsel); + KNOTE(&sc->rsel.si_note, 0); } static int