Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/usb_mouse.c
Show First 20 Lines • Show All 291 Lines • ▼ Show 20 Lines | umouse_event(uint8_t button, int x, int y, void *arg) | ||||
pthread_mutex_unlock(&sc->mtx); | pthread_mutex_unlock(&sc->mtx); | ||||
pthread_mutex_lock(&sc->ev_mtx); | pthread_mutex_lock(&sc->ev_mtx); | ||||
sc->hci->hci_intr(sc->hci, UE_DIR_IN | UMOUSE_INTR_ENDPT); | sc->hci->hci_intr(sc->hci, UE_DIR_IN | UMOUSE_INTR_ENDPT); | ||||
pthread_mutex_unlock(&sc->ev_mtx); | pthread_mutex_unlock(&sc->ev_mtx); | ||||
} | } | ||||
static void * | static void * | ||||
umouse_init(struct usb_hci *hci, nvlist_t *nvl) | umouse_init(struct usb_hci *hci, config_node_t *node) | ||||
{ | { | ||||
struct umouse_softc *sc; | struct umouse_softc *sc; | ||||
sc = calloc(1, sizeof(struct umouse_softc)); | sc = calloc(1, sizeof(struct umouse_softc)); | ||||
sc->hci = hci; | sc->hci = hci; | ||||
sc->hid.protocol = 1; /* REPORT protocol */ | sc->hid.protocol = 1; /* REPORT protocol */ | ||||
pthread_mutex_init(&sc->mtx, NULL); | pthread_mutex_init(&sc->mtx, NULL); | ||||
▲ Show 20 Lines • Show All 520 Lines • Show Last 20 Lines |