From owner-freebsd-arch Tue May 16 14: 5:25 2000 Delivered-To: freebsd-arch@freebsd.org Received: from cypherpunks.ai (cypherpunks.ai [209.88.68.47]) by hub.freebsd.org (Postfix) with ESMTP id 9F7D537B797 for ; Tue, 16 May 2000 14:05:21 -0700 (PDT) (envelope-from jeroen@vangelderen.org) Received: from vangelderen.org (intefix.ai [209.88.68.216]) by cypherpunks.ai (Postfix) with ESMTP id E729E78; Tue, 16 May 2000 17:05:19 -0400 (AST) Message-ID: <3921B7F7.8440441D@vangelderen.org> Date: Tue, 16 May 2000 17:04:55 -0400 From: "Jeroen C. van Gelderen" X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Doug Rabson Cc: arch@freebsd.org Subject: Re: A new api for asynchronous task execution (2) References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Doug Rabson wrote: [...] > #define TQ_DEF 0 /* use blocking mutex */ Minor nits: If this means default, I'd rename it to TQ_DEFAULT. No need to be cryptic, preprocessors can handle legible names these days. Additionally, it may be useful to be able to explicitly specify TQ_BLOCKING in case the default ever changes. [...] > DESCRIPTION > These functions provide a simple interface for asynchronous execution of > code. > > Before a queue can be used, it must first be initialised with > taskqueue_init(). The arguments to taskqueue_init() include a name which > should be unique, [...] Wouldn't it be a good idea to enforce unique names? This might prevent some obscure bugs (KLDs creating their own queues) and shouldn't hurt as taskqueue create performance doesn't seem critical. [...] > The system provides a global taskqueue, taskqueue_swi, which is run via a > software interrupt mechanism. To use this queue, call > taskqueue_enqueue() with the value of the global variable taskqueue_swi. > The queue will be run at splsofttq(). [...] I think this should go in a separate manpage describing the SWI mechanism. SWI depends on taskqueue, not the other way around... Cheers, Jeroen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message