src/GLdispatch/GLdispatch.c
void __glDispatchReset(void)
{
    __GLdispatchTable *cur, *tmp;

    /* Reset the dispatch lock */
    __glvndPthreadFuncs.mutex_init(&dispatchLock.lock, NULL);
    dispatchLock.isLocked = 0;

    LockDispatch();
    /*
     * Clear out the current dispatch list.
     */

    glvnd_list_for_each_entry_safe(cur, tmp, &currentDispatchList, entry) {
        cur->currentThreads = 0;
        glvnd_list_del(&cur->entry);
    }
    UnlockDispatch();

    /* Clear GLAPI TLS entries. */
    SetCurrentThreadState(NULL);
    _glapi_set_current(NULL);
}
/*
 * Handles resetting GLdispatch state after a fork.
 */
Handles resetting GLdispatch state after a fork.
Handles resetting GLdispatch state after a fork .
void __glDispatchReset(void)
{
    __GLdispatchTable *cur, *tmp;
    __glvndPthreadFuncs.mutex_init(&dispatchLock.lock, NULL);
    dispatchLock.isLocked = 0;
    LockDispatch();
    glvnd_list_for_each_entry_safe(cur, tmp, &currentDispatchList, entry) {
        cur->currentThreads = 0;
        glvnd_list_del(&cur->entry);
    }
    UnlockDispatch();
    SetCurrentThreadState(NULL);
    _glapi_set_current(NULL);
}
void __glDispatchReset ( void ) { __GLdispatchTable * cur , * tmp ; __glvndPthreadFuncs . mutex_init ( & dispatchLock . lock , NULL ) ; dispatchLock . isLocked = 0 ; LockDispatch ( ) ; glvnd_list_for_each_entry_safe ( cur , tmp , & currentDispatchList , entry ) { cur -> currentThreads = 0 ; glvnd_list_del ( & cur -> entry ) ; } UnlockDispatch ( ) ; SetCurrentThreadState ( NULL ) ; _glapi_set_current ( NULL ) ; }
Handles resetting GLdispatch state after a fork.
Handles resetting GLdispatch state after a fork .
/* Reset the dispatch lock */ /*
     * Clear out the current dispatch list.
     */ /* Clear GLAPI TLS entries. */