From owner-freebsd-arch Sat May 13 0:19:13 2000 Delivered-To: freebsd-arch@freebsd.org Received: from mass.cdrom.com (adsl-63-202-176-114.dsl.snfc21.pacbell.net [63.202.176.114]) by hub.freebsd.org (Postfix) with ESMTP id 603F037B5CD for ; Sat, 13 May 2000 00:19:11 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id AAA01437; Sat, 13 May 2000 00:18:50 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Message-Id: <200005130718.AAA01437@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Doug Rabson Cc: arch@freebsd.org Subject: Re: A new api for asynchronous task execution In-reply-to: Your message of "Fri, 12 May 2000 20:44:39 BST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 13 May 2000 00:18:50 -0700 From: Mike Smith Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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? > 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'm also wondering about naming the queue instances and linking them all together for eg. debugging or "find queue by name" functionality. Apart from that, I'm delirious at the thought of this; I've been waiting for something similar for a long time now. 8) -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message