• Kyle Brenneman's avatar
    libGLdispatch: Fix multiple calls to __glDispatchInit/Fini. · 7dce9384
    Kyle Brenneman authored
    In libGLdispatch, initialize the pthreads table in a constructor function so
    that we can use the dispatch mutex in __glDispatchInit.
    In __glDispatchFini, check whether clientRefcount has dropped to zero before
    tearing everything down.
    libGL and libOpenGL will now call __glDispatchFini when they're unloaded, since
    they also call __glDispatchInit.