From owner-freebsd-hackers Tue Mar 23 14: 6:27 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from herring.nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (Postfix) with ESMTP id 6EBAB152B1 for ; Tue, 23 Mar 1999 14:06:21 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id VAA81338; Tue, 23 Mar 1999 21:39:38 GMT (envelope-from dfr@nlsystems.com) Date: Tue, 23 Mar 1999 21:39:38 +0000 (GMT) From: Doug Rabson To: Nick Hibma Cc: FreeBSD hackers mailing list Subject: Re: scheduling a function call from int routines In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 23 Mar 1999, Nick Hibma wrote: > > The usbd thing we are doing right now, but I don't like it, as you have > to pick up the pieces when the daemon is killed. Try it and you will see > what I mean. Lot's of failed transfers. Most probably could be solved, I > agree, but not as a first priority, > > A kernel thread would be easier and I do remember something like that > being mentioned somewhere in the manpages. Any chance you know where to > find it? > > Nick You can create kernel threads at startup time by using SYSINIT_KT. This isn't supported by KLD though so it might not be the best solution. For usbd, I think it selects on a control device (or something) and wakes up when an event has happened, calling ioctl (or something) to handle the event. This isn't what I was thinking of though; something more like nfsiod might be better: if (!fork()) usb_syscall(...); /* never returns */ The syscall could be replaced by an ioctl I guess. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message