From owner-freebsd-hackers Thu Mar 25 17: 9: 2 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (Postfix) with ESMTP id 1B3F814D03 for ; Thu, 25 Mar 1999 17:09:02 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.3/8.8.8) with ESMTP id RAA01514; Thu, 25 Mar 1999 17:00:41 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199903260100.RAA01514@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Nick Hibma Cc: FreeBSD hackers mailing list Subject: Re: scheduling a function call from int routines In-reply-to: Your message of "Tue, 23 Mar 1999 00:42:43 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 25 Mar 1999 17:00:41 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > I want to schedule a function call from an interrupt routine. How do I > do that? timeout? > > As in, a USB returns in an interrupt the message the fact that the > connection status of one of the ports or suspend status has changed. I > cannot start checking the ports from that interrupt routine, because I > need to transfer data to the device to make that work. You could use a timeout, yup, or look at the way that netisrs work. However, they run in a different interrupt context. 8) I'd either use a kernel process, or fix things so that you can transfer data from interrupt context (eg. use a state machine in the interrupt handler). -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message