From owner-freebsd-arch@FreeBSD.ORG Thu Nov 4 21:49:24 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 176771065701; Thu, 4 Nov 2010 21:49:24 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 730798FC14; Thu, 4 Nov 2010 21:49:23 +0000 (UTC) Received: by gwj16 with SMTP id 16so1890883gwj.13 for ; Thu, 04 Nov 2010 14:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=y5OWkyV0yWOgrJoXXzsMGOw+u+lerBuuB68hIWvCy20=; b=RImZJ053F2jMX3McwHgNha06a1oquosW3mUcVyDYtk3SSbExv0r6H7sWE9HTrmY8hM 66kLZO3FaPGPL1CwwLiCYgqjSGV5bIKLzNpjVCe3JPIgdd4nvaedznesRut/FQs/M06z igr8n4IMQYYZKc+4VwjGP0QPY8ryZBE5y3KCU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=qWa94M36Byq7C0OS+BuSi8WSfDGJHFlkPcQ5jZi23oDSqRXS0nDgDT4yTjJ3EMmvpX hk/6EJN4C0A5ZsePlAGE5z7DWTiZIe2gXq4WNHmTFYJgqVRvwip6K4TgLXnkjH6ZpB/E sv8lof1UM+BhXYDrgAfDgLm9qeSFaADQTCCdE= MIME-Version: 1.0 Received: by 10.42.193.17 with SMTP id ds17mr926521icb.276.1288907362527; Thu, 04 Nov 2010 14:49:22 -0700 (PDT) Received: by 10.231.159.198 with HTTP; Thu, 4 Nov 2010 14:49:22 -0700 (PDT) In-Reply-To: <201011041722.46673.jhb@freebsd.org> References: <201011012054.59551.hselasky@c2i.net> <201011042115.16187.hselasky@c2i.net> <201011041722.46673.jhb@freebsd.org> Date: Thu, 4 Nov 2010 14:49:22 -0700 Message-ID: From: Matthew Fleming To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-usb@freebsd.org, Hans Petter Selasky , freebsd-current@freebsd.org, Andrew Thompson , freebsd-arch@freebsd.org, Weongyo Jeong Subject: Re: [RFC] Outline of USB process integration in the kernel taskqueue system X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Nov 2010 21:49:24 -0000 On Thu, Nov 4, 2010 at 2:22 PM, John Baldwin wrote: > On Thursday, November 04, 2010 4:15:16 pm Hans Petter Selasky wrote: >> I think that if a task is currently executing, then there should be a drain >> method for that. I.E. two methods: One to stop and one to cancel/drain. Can >> you implement this? > > I agree, this would also be consistent with the callout_*() API if you had > both "stop()" and "drain()" methods. Here's my proposed code. Note that this builds but is not yet tested. Implement a taskqueue_cancel(9), to cancel a task from a queue. Requested by: hps Original code: jeff MFC after: 1 week http://people.freebsd.org/~mdf/bsd-taskqueue-cancel.diff Thanks, matthew