Re: [AD] Using HPET in Linux/Unix?

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


On Fri, 2005-08-26 at 06:20 -0700, Chris wrote:
> I thought we were forgoing forward compatiblity in 4.2, instead leaving just 
> backward?

Ah, yes, then it can be done for 4.2 even of course.

> > Shouldn't it be done as a separate timer driver?
> 
> Of course. But what I'm saying is that we could move the sound callback 
> function to a user timer (which can use HPET or threads), while leaving the X 
> input/graphics callbacks in the bg manager, which will continue to use 
> threads only.

Makes sense. I assume, that's how it already works, i.e. the background
thread is independent of the timer driver in use.

> > On the subject of timers, I assume the al_get_ticks() in 4.3.x will get
> > rid of 95% (or more) of the use of timers in current Allegro programs,
> > since usually all they do is incrementing some frame counter :)
> 
> That's what I would guess. And hopefully we could encourage using pthreads for 
> threads (since that's what the majority of the multi-tasking world uses, and 
> there is a Win32 version) which would all but eliminate need for timers. But 
> my thought is that if we're going to have/keep Allegro's timers around, we 
> might as well implement them properly (which is what an HPET driver would be 
> for).

Yes. Maybe we should include a simple example showing how it is done.
The important part of that example would be the difference of
linux/windows/OSX.. I assume, it would mainly be what header to include,
and how to link.

-- 
Elias Pschernig





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