From owner-freebsd-arch Sun May 14 5: 6:59 2000 Delivered-To: freebsd-arch@freebsd.org Received: from cmailg1.svr.pol.co.uk (cmailg1.svr.pol.co.uk [195.92.195.171]) by hub.freebsd.org (Postfix) with ESMTP id AB75B37B9F1; Sun, 14 May 2000 05:06:51 -0700 (PDT) (envelope-from n_hibma@calcaphon.com) Received: from [195.92.67.23] (helo=mail18.svr.pol.co.uk) by cmailg1.svr.pol.co.uk with esmtp (Exim 3.13 #0) id 12qxAY-0004cR-00; Sun, 14 May 2000 13:06:50 +0100 Received: from modem-123.porcupine-puffer.dialup.pol.co.uk ([62.137.50.251] helo=henny.webweaving.org) by mail18.svr.pol.co.uk with esmtp (Exim 3.13 #0) id 12qxAW-0005v0-00; Sun, 14 May 2000 13:06:49 +0100 Received: from localhost (localhost [127.0.0.1]) by henny.webweaving.org (8.9.3/8.9.3) with ESMTP id PAA76984; Sat, 13 May 2000 15:28:35 +0100 (BST) (envelope-from n_hibma@calcaphon.com) Date: Sat, 13 May 2000 15:28:35 +0100 (BST) From: Nick Hibma X-Sender: n_hibma@localhost Reply-To: Nick Hibma To: Doug Rabson Cc: Mike Smith , arch@FreeBSD.ORG Subject: Re: A new api for asynchronous task execution In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > void (*func)(void *, int); /* task handler */ > > > > What's the second argument? > > Its explained later on in the text. Its a count of how many times the task > was queued since the queue was last run. (If it is correct C) I would like to see explicit names in function arguments. I know that in general that that is not your style, if it is not needed, but it certainly makes reading the header / manpage file a lot easier, i.e. you only have to scan the first page to see what you need, instead of having to read the page. After all, who needs manpages if you have a header file (and ctags :-) Nick > > Any sense in having statically-initialised task queues? > > > > TASK_QUEUE(name); > > I thought of this but couldn't quite decide if it was useful. I don't > expect there to be many queues around. To start with, there will only be > the SWI queue. I think it is a valid point. Otherwise you might get an increased number of modules that require init on load. This functionality is bound to become very useful in cases where you want to execute things in a batched fashion. Apart from that, IMHO it should be TASK_QUEUE(name, enqueue_fn) to match taskqueue_init. Nick -- n_hibma@webweaving.org n_hibma@freebsd.org USB project http://www.etla.net/~n_hibma/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message