Date: Sat, 13 May 2000 10:02:08 +0100 (BST) From: Doug Rabson <dfr@nlsystems.com> To: Daniel Eischen <eischen@vigrid.com> Cc: arch@FreeBSD.ORG Subject: Re: A new api for asynchronous task execution Message-ID: <Pine.BSF.4.21.0005131000050.47945-100000@salmon.nlsystems.com> In-Reply-To: <200005122016.QAA17205@pcnet1.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 12 May 2000, Daniel Eischen wrote: > Doug Rabson <dfr@nlsystems.com> wrote: > > To execute all the tasks on a queue, call taskqueue_run(). When a task > > is executed, first it is removed from the queue, the value of pending is > > recorded and the field is zeroed. The function func from the task struc- > > ture is called with the value arg from the structure as its first argu- > > ment and the value of pending as its second argument. > > Minor nit. If you ever want to add more than one argument to func, > then it would be better to have pending as the first argument to > func rather than the last. I don't plan to add any more arguments to func. The void* argument should be sufficient for any context that the caller has. Originally, I didn't even have the pending argument but Nick Hibma suggested it as a simple way to deal with a task being added to a queue multiple times. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8442 9037 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.21.0005131000050.47945-100000>