Re: [AD] XIM patch for Allegro 4.1.x |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] XIM patch for Allegro 4.1.x
- From: Elias Pschernig <allefant@xxxxxxxxxx>
- Date: Wed, 24 Nov 2004 03:17:05 +0100
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=EM38bCZ1pD780xoiUfRko/zO0zJtjA5pQTBXJTGTjo651nvFIzMRmqoxUe/lHnxZK5e6YpryjRkMUbSpbbbOtB+3FKOveknPp0jHIqkDTkIdLje/S07jUEJYP8rjIEGFiXyzRnFG2Wo6DvL5Y7QldTrFAUqlhZky48lGczH4/Mo=
> Hmm.. I'm surprised it doesn't deadlock. You're trying to draw to the
> screen in a input thread? The input thread should have its own XLOCK on
> while grabbing input, and drawing to the screen should result in another
> XLOCK.
>
Ahh.. heh, wonder what I was thinking. I guess, the lock is recursive,
so since the input thread has the lock, the gfx calls suceeds, inside
the same thread. And as long as I only use reentrant functions, it
works. The crashes Julien gets are probably due to the gfx functions not
being fully reentrant. And they aren't supposed to - so yeah, definitely
shouldn't draw from the keyboard callback.
Hm, actually.. this is the same as the timer thread does for the mouse
cursor update. So it shouldn't crash. Anyway, I'm too tired right now to
think this through.