]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add the following functions to abstract away the creation of task threads
authoralfred <alfred@FreeBSD.org>
Mon, 8 Jan 2007 23:21:06 +0000 (23:21 +0000)
committeralfred <alfred@FreeBSD.org>
Mon, 8 Jan 2007 23:21:06 +0000 (23:21 +0000)
commitf11c252b707388cec46312e0bb40357915f70a68
treeeed129bbc6039fa6114f81248214f3e07b79c5ba
parentbc556da94cf284f459efee9aee092835f991554c
Add the following functions to abstract away the creation of task threads
for usb.  I hope that this will eventually be used for generic devices
that need full fledged blocking threads for event processing.

Create a taskqueue:
void usb_ether_task_init(device_t, int, struct usb_taskqueue *);

Enqueue a task:
void usb_ether_task_enqueue(struct usb_taskqueue *, struct task *);

Wait for all tasks queued to complete:
void usb_ether_task_drain(struct usb_taskqueue *, struct task *);

Destroy the taskqueue:
void usb_ether_task_destroy(struct usb_taskqueue *);
sys/dev/usb/usb_ethersubr.c
sys/dev/usb/usb_ethersubr.h