Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Nov 1999 01:34:15 -0600 (CST)
From:      Kevin Day <toasty@dragondata.com>
To:        hasty@rah.star-gate.com (Amancio Hasty)
Cc:        doconnor@gsoft.com.au (Daniel O'Connor), current@FreeBSD.ORG, yokota@zodiac.mech.utsunomiya-u.ac.jp (Kazutaka YOKOTA), mike@smith.net.au (Mike Smith)
Subject:   Re: vga driver and signal
Message-ID:  <199911050734.BAA95943@celery.dragondata.com>
In-Reply-To: <199911050254.SAA50665@rah.star-gate.com> from "Amancio Hasty" at Nov 04, 1999 06:54:11 PM

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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