Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Mar 1999 17:00:41 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Nick Hibma <hibma@skylink.it>
Cc:        FreeBSD hackers mailing list <hackers@freebsd.org>
Subject:   Re: scheduling a function call from int routines 
Message-ID:  <199903260100.RAA01514@dingo.cdrom.com>
In-Reply-To: Your message of "Tue, 23 Mar 1999 00:42:43 %2B0100." <Pine.BSF.3.96.990323004029.905A-100000@heidi.plazza.it> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903260100.RAA01514>