diff options
Diffstat (limited to 'sys/dev/usb/usbdi.h')
-rw-r--r-- | sys/dev/usb/usbdi.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 64f4644..f1824c5 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.h,v 1.47 2001/01/21 02:39:53 augustss Exp $ */ +/* $NetBSD: usbdi.h,v 1.48 2001/01/21 19:00:06 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -177,6 +177,21 @@ usb_endpoint_descriptor_t *usbd_get_endpoint_descriptor usbd_status usbd_reload_device_desc(usbd_device_handle); +/* + * The usb_task structs form a queue of things to run in the USB event + * thread. Normally this is just device discovery when a connect/disconnect + * has been detected. But it may also be used by drivers that need to + * perform (short) tasks that must have a process context. + */ +struct usb_task { + SIMPLEQ_ENTRY(usb_task) next; + void (*fun)(void *); + void *arg; + char onqueue; +}; + +void usb_add_task(usbd_device_handle dev, struct usb_task *task); + struct usb_devno { u_int16_t ud_vendor; u_int16_t ud_product; |