Re: [AD] proposal: remove XLOCK/XUNLOCK

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


On Sun, 2006-04-23 at 18:09 +0200, Milan Mimica wrote:
> Peter Wang wrote:
> > 
> > Are you sure?  I thought all XInitThreads did was allow you to use
> > XLockDisplay/XUnlockDisplay instead of some external locking mechanism.
> 
> I thought that too, but I looked at the X.org source code and every 
> function that needs locking locks itself with XLockDisplay/XUnlockDisplay.
> I hope they didn't forget some :-)
> 
> > I think your proposal is too drastic.  We can switch over to
> > XInitThreads/XLockDisplay easily to support Mesa without dropping all
> > XLOCK/XUNLOCK.  Could even make it a configure option to should between
> > pthreads locking and X locking, for those who haven't upgraded their X
> > servers.
> 
> Yeah, there shouldn't be any problems just to call XInitThreads for 
> those libs which need it and stick to pthread mutexes. We're talking 
> about stable version of allegro here.
> 

But the problem just is, XLOCK/XUNLOCK is inherently error prone, and
since as you found out, x.org already calls XLockDisplay/XUnlockDisplay
where it needs it, is not needed at all.

-- 
Elias Pschernig





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