[AD] Re: race condition when removing/adding ints |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Tue, 2005-01-25 at 15:01 +0100, Elias Pschernig wrote:
> Anyone remember what this line in timer.c means:
>
> #undef ALLEGRO_MULTITHREADED /* FIXME */
>
> Apparently, removing it fixes a crash someone got on allegro.cc with
> 4.1.18 (calling unscare_mouse removes a timer int while it is active).
>
> I didn't notice any deadlocks or instability with the line above removed
> so far.. so if nobody remembers or wants to seatch the archives, I guess
> we should aim for removing it for 4.2.0.
Hm, ok, I get deadlocks on shutdown now. Not exactly sure how, but
apparently the mouse drawer (what else) first locks the timer mutex,
then waits on the x11 mutex. Now, when shutting down, I somehow get the
main thread to have the x11 mutex locked, and then try to remove an
int :P
I feel this is a can of worms.. can't threads be simpler?
--
Elias Pschernig