Re: [AD] race condition when removing/adding ints

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


On Sat, 2005-01-29 at 16:16 +1100, Peter Wang wrote:
> Elias Pschernig wrote:
> 
> >The second removes the keyboard timer from the X11 keyboard driver, and
> >ideally the same would be done with all ports (even DOS does without
> >it!). But it seems, DOS and X11 have the advantage to get the key repeat
> >from the HW/the OS - while DirectX discards that information for us.
> >Again, would need a windows/DX expert to know how to get key repeat
> >info. Maybe using winapi functions to get keys instead? 
> >
> 
> In the new_api_branch use Win32 `waitable timers' to set up repeat 
> events at the wkeybdnu.c level, rather than higher up.  You should be 
> able to do the same thing in the trunk.

Yes, that sounds like a good solution. OSX could also be a problem, it
uses the unix timers, but also installs a repeat timer from the keyboard
handler.

I wonder if the unscare_mouse issue shows up on other platforms at all
though, since they don't have such strict locking as X11. So, for 4.2.0,
it could be an alternate solution to just leave the #undef MULTITHREADED
in timer.c enabled for windows and OSX.

-- 
Elias Pschernig





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