Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57b0d2cf authored by Jamie Gennis's avatar Jamie Gennis Committed by Android Git Automerger
Browse files

am 8df2c424: Merge "Fix a multithreading bug in libagl\'s EGL." into honeycomb

* commit '8df2c42413cfdde1c4290b4797a09c4bafb6c3bc':
  Fix a multithreading bug in libagl's EGL.
parents 88be8935 88d0a443
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -82,6 +82,11 @@ static GLint getError() {
    if (ggl_unlikely(gEGLErrorKey == -1))
        return EGL_SUCCESS;
    GLint error = (GLint)pthread_getspecific(gEGLErrorKey);
    if (error == 0) {
        // The TLS key has been created by another thread, but the value for
        // this thread has not been initialized.
        return EGL_SUCCESS;
    }
    pthread_setspecific(gEGLErrorKey, (void*)EGL_SUCCESS);
    return error;
}