Re: [AD] This Allegro app can freeze under Windows 2000

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


On Wed, 2005-12-28 at 16:07 +0100, Evert Glebbeek wrote:
> On Wednesday 28 December 2005 15:31, Elias Pschernig wrote:
> > > What if you remove the show_mouse and acquire_mouse stuff? I always
> > > thought it is broken except under DOS.
> > > 
> > 
> > I mean, show_mouse/scare_mouse/unscare_mouse.
> 
> Should work whenever there is a software cursor (*scare_mouse() is a no-op 
> when the OS is responsible for drawing the cursor).
> 

Yes, but since the mouse is drawn from the timer thread, this never
worked correctly in the multithreaded ports.

The screen is locked with acquire_bitmap from the main thread, then the
timer thread does acquire_bitmap from another thread - and now it either
is already deadlocked (under linux), or will deadlock sooner or later
when also the timer lock is acquired, and scare_mouse tries to remove
the timer interrupt.. it simply is very flawed design :/ 

-- 
Elias Pschernig





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