> > Kind of complex though. Also the interrupt latency problem is still there.
> 
> Not sure that this is as elegant as what you are suggesting , can 
> the kernel schedule a user level routine to be executed when an interrupt 
> occurs? I guess on Windoze land this is called a driver call-back.
> 
> 

In a project I'm working on now (that some of you saw at FreeBSDCon) I had a
need to sync a lot of things to a vsync interrupt. I ended up writing a
small driver to attach to the video card.  My program would do a blocking
read on the device, which would put that process to sleep. The interrupt
handler would shove one byte of data back to the process through the read
(indicating interrupt status) and wake up the process.

This works, but still has a problem if latency and missed interrupts if you
aren't reading when the interrupt happens. (I've worked around those too,
but that's quite a bit more involved to fix it). You'll probably need to end
up changing the scheduler slightly, or playing with rtprio.

Kevin


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

Reply via email to