Date: Sat, 13 May 2000 09:59:09 +0100 (BST) From: Doug Rabson <dfr@nlsystems.com> To: Mike Smith <msmith@freebsd.org> Cc: arch@freebsd.org Subject: Re: A new api for asynchronous task execution Message-ID: <Pine.BSF.4.21.0005130954180.47945-100000@salmon.nlsystems.com> In-Reply-To: <200005130718.AAA01437@mass.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 13 May 2000, Mike Smith wrote: > > I'm planning to add a new system to the kernel which should make it much > > easier for drivers (especially loadable drivers) to use software > > interrupts to implement split-level interrupt handlers. The api was > > inspired by the Linux tqueue system but the implementation is quite > > different. > ... > > 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. > > > void *arg; /* argument for handler */ > > }; > > > > struct taskqueue { > > STAILQ_HEAD(, task) queue; > > void (*enqueue)(struct taskqueue *queue); > > }; > > > > void > > taskqueue_init(struct taskqueue *queue, > > void (*enqueue)(struct taskqueue *queue)) > > 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'm also wondering about naming the queue instances and linking them all > together for eg. debugging or "find queue by name" functionality. I'll think about it. I do want to keep this thing as lightweight as possible though. > > Apart from that, I'm delirious at the thought of this; I've been waiting > for something similar for a long time now. 8) I needed it when I started porting the Linux Matrox DRI driver. They use software interrupts to do the work of sceduling DMA between different 3D applications and there just wasn't anything usable in the FreeBSD kernel for this. -- 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.0005130954180.47945-100000>