From owner-cvs-all@FreeBSD.ORG Mon Jan 8 23:21:07 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D06016A403; Mon, 8 Jan 2007 23:21:07 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 4CC5D13C459; Mon, 8 Jan 2007 23:21:07 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l08NL7wA016770; Mon, 8 Jan 2007 23:21:07 GMT (envelope-from alfred@repoman.freebsd.org) Received: (from alfred@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l08NL7sH016758; Mon, 8 Jan 2007 23:21:07 GMT (envelope-from alfred) Message-Id: <200701082321.l08NL7sH016758@repoman.freebsd.org> From: Alfred Perlstein Date: Mon, 8 Jan 2007 23:21:07 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/usb usb_ethersubr.c usb_ethersubr.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2007 23:21:07 -0000 alfred 2007-01-08 23:21:07 UTC FreeBSD src repository Modified files: sys/dev/usb usb_ethersubr.c usb_ethersubr.h Log: 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 *); Revision Changes Path 1.23 +30 -0 src/sys/dev/usb/usb_ethersubr.c 1.12 +9 -0 src/sys/dev/usb/usb_ethersubr.h