OneTimeLock protects one time initializations and is instantiated with
_glthread_DECLARE_STATIC_MUTEX, an used without ever calling
_glthread_INIT_MUTEX or _glthread_DESTROY_MUTEX.

This is non portable, especially on Windows, where locks must be
initialized before using, so it ends up defining
_glthread_DECLARE_STATIC_MUTEX without the static keyword in order to
initialize it from somewhere else. ugh

And if the OneTimeLock has to be initialized one time before it is used
there is not much point for it to exist in the first place. 

Is there any reason to not simply have an one time Mesa initialization
function, which must be called before creating a Mesa context?

If a Mesa driver does not have a single initialization point, then let
it create its own lock to protect the call of this mesa one time
initialization function.

Jose


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to