Bernd Stahlbock ([EMAIL PROTECTED]) wrote:
> Hello there,
> 
> I've got some problems wasting too much processor time in my rtlinux
> project. Especially, I'm polling a status bit of the VGA card, that
> tells me, that a VSync occurs. Since the Vsync is every 18ms and I've
> to react quick, I have to do a close loop polling, which wastes about
> 9ms processor time for every Vsync. Is there a opportunity to react to
> that signal by a handler or interrupt or something?

Why can't you busy wait for the first VSync, then sleep for
say 17.5 ms and start busy waiting again? This way you'd only waste
500 us per VSync.

Note that rt_get_time() units are not microseconds but 8254 clock ticks
(1198030 ticks or so per second). You can use the RT_TICKS_PER_SEC
macro.

Michael.

--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to