version 1.14.2.4, 2008/01/21 09:37:26 |
version 1.14.2.5, 2008/03/17 09:14:21 |
Line 194 apmattach(parent, self, aux) |
|
Line 194 apmattach(parent, self, aux) |
|
sc->event_ptr = 0; |
sc->event_ptr = 0; |
sc->event_count = 0; |
sc->event_count = 0; |
mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE); |
mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE); |
|
selinit(&sc->sc_rsel); |
} |
} |
|
|
int |
int |
Line 396 apm_record_event(sc, event_type) |
|
Line 397 apm_record_event(sc, event_type) |
|
sc->event_ptr %= APM_NEVENTS; |
sc->event_ptr %= APM_NEVENTS; |
evp->type = event_type; |
evp->type = event_type; |
evp->index = ++apm_evindex; |
evp->index = ++apm_evindex; |
selwakeup(&sc->sc_rsel); |
selnotify(&sc->sc_rsel, 0, 0); |
return (sc->sc_flags & SCFLAG_OWRITE) ? 0 : 1; /* user may handle */ |
return (sc->sc_flags & SCFLAG_OWRITE) ? 0 : 1; /* user may handle */ |
} |
} |
#endif |
#endif |