Re: [AD] Added yield_timeslice to vsync

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, 2004-04-05 at 15:51, Eric Botcazou wrote:
> > The busy loop is just the same as "rest" - so I see no problem at all
> > adding yield_timeslice with your patch.
> 
> I think it would have been acceptable with the former behaviour of 
> yield_timeslice, but I'm not convinced at all it is now.
> 

Yes, for other drivers, who wait for video synchronization, it's no good
idea. But the X11 driver just waits for an Allegro timer (just as rest()
does) - so there it shouldn't make a difference. The main use for
vsync() in X11 seems to be to synchronize to Allegro's retrace
simulation - unless I'm mistaken and XSync() can do something which is
time critical..

[..]
> > About yield_timeslice, maybe we should make a config option for it, like
> > this:
> >
> > [system]
> > busy_waiting = on/off
> >
> > Default would be off, so Allegro programs would behave nice. If you set
> > it to on, yield_timeslice would do the 4.1.12 behavior. Then we could
> > use yield_timeslice whereever something waits, but users/games would
> > have an option to just run without busy waiting and 100% CPU usage,
> > therefore possibly getting better precision.
> 
> Yes, that's interesting.

Could just set a global flag in allegro_init, and check it in all the
system driver implementations of yield_timeslice, I guess. I add it to
my personal TODO list.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/