> -----Original Message-----
Samuel Tardieu [mailto:[EMAIL PROTECTED]] writes:
> Sent: Thursday, March 30, 2000 11:46 AM
> To: Eric Peterson
> Cc: '[EMAIL PROTECTED]'
> Subject: Re: Deferred procedure call available?
> 
> 
> >>>>> "Eric" == Eric Peterson <[EMAIL PROTECTED]> writes:
> 
> Eric> Sometimes called "task queues" or "deferred callbacks", they
> Eric> allow an interrupt handler to schedule a (possibly predefined)
> Eric> function to be called outside the context of the interrupt.
> 
> (not an answer, just a suggestion) Is there anything you cannot do
> with a userland program, that will be resumed by the interrupt
> handler? Doing this even gives you the possibility of choosing the
> priority of the deferred handler relative to other handler and regular
> processes (as eCos does).

Sam,
        Thanks for the response. With regard to your suggestion (my
ignorance of
        FreeBSD drivers certainly shows through here, but...): 

                1. I'm porting an existing driver, so am trying to keep its
basic 
                structure intact. I don't believe that a user-mode entity
has
                access to the memory/device address space I need to get to.

                2. I suspect that going from kernel to (even high priority)
user
                mode entails a non-trivial performance penalty (somebody
please correct
                me if not!)

        One other approach I was thinking about was to have a sleeping
kernel thread
        that I could wakeup when I needed to schedule a function to be
called.
        
        I'm going to try out the timeout(9) routine that Mike Smith
suggested, looks like
        just the ticket (thanks again, Mike).

Regards,
Eric

--
Eric Peterson     WB6PYK
[EMAIL PROTECTED]
PGP: http://pgp5.ai.mit.edu:11371/pks/lookup?op=get&search=0x4DA8EEF1


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to