Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 May 2000 15:28:35 +0100 (BST)
From:      Nick Hibma <n_hibma@calcaphon.com>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        Mike Smith <msmith@FreeBSD.ORG>, arch@FreeBSD.ORG
Subject:   Re: A new api for asynchronous task execution 
Message-ID:  <Pine.BSF.4.20.0005131518230.76952-100000@localhost>
In-Reply-To: <Pine.BSF.4.21.0005130954180.47945-100000@salmon.nlsystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> > > 	     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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.20.0005131518230.76952-100000>